[Samba] Direct I/O

Christof Schmitt cs at samba.org
Wed Jan 26 15:44:36 UTC 2022

On Tue, Jan 25, 2022 at 10:10:04PM +0100, Ralph Boehme via samba wrote:
> On 1/25/22 22:02, Christof Schmitt wrote:
> > Strictly speaking, WRITE_THROUGH would match the SYNC flag (write the
> > data to stable storage).
> yup.
> > WRITE_UNBUFFERED implies writing to storage,
> > but ensure that there is no data buffered, which has no Linux/POSIX
> > equivalent call (to my knowledge).
> That would be open() flag O_DIRECT.
> Wait... so there's no RWF_DIRECT? Indeed, drat! Not sure how RWF_HIPRI
> relates.

There was apparently an attempt to introduce RWF_UNCACHED, but that did
not make it into the Linux kernel:

My understanding from this thread is that this is not worth it; if
someone needs that behavior, just use O_DIRECT. Unfortunately that means
there is no flag available per write request.


More information about the samba mailing list