diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-11-01 13:02:11 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-09 12:32:40 -0300 |
| commit | 0e85145af984f7cae2aadaa694cb8612009027ac (patch) | |
| tree | 6f512b31acefd510044b8930dd4776b54f111a9e /tools/perf/scripts/python/flamegraph.py | |
| parent | f02d249e9756b78990aaaa1635e47e06deb2cb51 (diff) | |
smb: client: don't write back through O_DIRECT handles
Writeback uses the first writable handle of the inode, which may have
been opened with O_DIRECT. Such handles are opened with
FILE_NO_INTERMEDIATE_BUFFERING, for which Windows rejects any unaligned
I/O with STATUS_INVALID_PARAMETER. Writeback of partly dirty pages and
of the unaligned tail of a file through one of them fails, so netfs ends
it with the folios clean and the data never reaches the server.
xfstests generic/051, where fsstress mixes both kinds of opens, loses
about 1% of its writes this way:
smb3_write_err: ... offset=0xde90d7 len=0xbd0b rc=-22
All the rejected writes in a network capture were unaligned writes on a
no-buffering handle; none of the aligned ones, and none of the unaligned
ones on regular handles, were.
Prefer a handle that was not opened with O_DIRECT, and use one that was
only if there is no other.
Fixes: 1013e760d10e ("SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags")
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
