Re: [RFC PATCH v2 6/8] fs: add FMODE_CAN_DMABUF_IO and require it for dma-buf I/O contexts

From: Christoph Hellwig

Date: Wed Nov 25 2026 - 01:12:10 EST


On Mon, Nov 23, 2026 at 09:28:07AM +0800, Mengmeng Zhao wrote:
> > This is stealing yet another FMODE_* bit for special-purpose stuff.
> > We're really really short of them. Did Christoph suggest this?
> Hi Christian, thanks for pointing out this. If I understand correctly,
> Christoph suggests a new file->f_mode to allow dma-buf check in RFC v1[1].
>
> Hi Christoph, do you have any comments or suggestions? I'am happy to adjust
> this in the next version if there is a better approach.

I didn't suggest a particular approach, but the FMODE_ bits seems very
fitting here as it sorts out the support issue very well.