On Mon, Jan 24, 2022 at 10:45:12AM +1300, Christian Blume via samba wrote:>Hello! > >Do you know if Samba supports Direct I/O using the O_DIRECT flag on >Linux? And if so, which configuration flag would be responsible for >it? Thus far I couldn't find any documentation on it.No, we don't currently use O_DIRECT on Linux. It doesn't match to SMB2+ semantics. What advantage do you think you might get from O_DIRECT ?
On 1/24/22 18:39, Jeremy Allison via samba wrote:> No, we don't currently use O_DIRECT on Linux. > > It doesn't match to SMB2+ semantics.I think it does (SMB2_WRITEFLAG_WRITE_UNBUFFERED), but we don't yet implement it correctly. We check the flag and basically skip an fsync() done in some cases, but we don't pass it to the OS. I guess the problem is that in SMB the unbuffered is requested per *write* whereas we can only request unbuffered IO per *handle* with O_DIRECT. But I may be missing something. -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20220124/ff020fc8/OpenPGP_signature.sig>