diff options
author | Bernd Schubert <bschubert@ddn.com> | 2024-09-12 16:06:09 +0200 |
---|---|---|
committer | Bernd Schubert <bernd.schubert@fastmail.fm> | 2024-09-13 19:10:44 +0200 |
commit | c00c9fd831ecbc17522271ba887f1c35ed61867c (patch) | |
tree | 2596121d67007f707b52c972fca6147c1d3ea64e /example/cuse.c | |
parent | 0a76670183f484461cf7d69c2761cfd65547500f (diff) | |
download | libfuse-c00c9fd831ecbc17522271ba887f1c35ed61867c.tar.gz |
example/passthrough_hp: No auto FOPEN_DIRECT_IO in passthrough mode
sfs_open and sfs_create set fi->direct_io (FOPEN_DIRECT_IO) when
O_DIRECT is given, in order to benefit from a shared inode lock
in kernel, i.e. to get parallel DIO writes. However, kernel side
disabled passthrough when FOPEN_DIRECT_IO is set. Reads/writes
had been totally failing in this case for O_DIRECT as
sfs_write_buf() and sfs_read() have a sanity check. That sanity
check could be modified, but for performance passthrough is
better than parallel DIO, hence, we only want automatic
FOPEN_DIRECT_IO for O_DIRECT when passthrough is not enabled.
Fixes: https://github.com/libfuse/libfuse/issues/1027
This also fixes automatically switching to FOPEN_DIRECT_IO
for O_DIRECT in sfs_create().
Diffstat (limited to 'example/cuse.c')
0 files changed, 0 insertions, 0 deletions