Skip to content

mm, netfs, cifs: Miscellaneous fixes

David Howells ceph-devel linux-cifs linux-erofs linux-fsdevel linux-mm linux-nfs lkml netfs v9fs 1 version Applied

Status from this message: Applied to the vfs.fixes branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6cifs: Fix lack of credit renegotiation on read retryfs/netfs/io.c fs/smb/client/cifsglob.h fs/smb/client/file.c +3 more+55 -160 replies
2/6netfs, cifs: Fix handling of short DIO readfs/netfs/io.c fs/smb/client/smb2pdu.c include/linux/netfs.h+21 -100 replies
3/6cifs: Fix copy offload to flush destination regionfs/smb/client/cifsfs.c+4 -170 replies
4/6mm: Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range()mm/filemap.c+1 -12 replies
5/6cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target regionfs/smb/client/smb2ops.c+14 -20 replies
6/6netfs, cifs: Improve some debugging bitsfs/netfs/io.c fs/smb/client/smb2ops.c+6 -40 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchSteve French
1/6
2/6
3/6
4/6Tested--by
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] mm, netfs, cifs: Miscellaneous fixes

Hi Christian, Steve,

Firstly, here are some fixes to DIO read handling and the retrying of reads, particularly in relation to cifs:

(1) Fix the missing credit renegotiation in cifs on the retrying of reads. The credits we had ended with the original read (or the last retry) and to perform a new read we need more credits otherwise the server can reject our read with EINVAL.

(2) Fix the handling of short DIO reads to avoid ENODATA when the read retry tries to access a portion of the file after the EOF.

Secondly, some patches fixing cifs copy and zero offload:

(3) Fix cifs_file_copychunk_range() to not try to partially invalidate folios that are only partly covered by the range, but rather flush them back and invalidate them.

(4) Fix filemap_invalidate_inode() to use the correct invalidation function so that it doesn't leave partially invalidated folios hanging around (which may hide part of the result of an offloaded copy).

(5) Fix smb3_zero_data() to correctly handle zeroing of data that's buffered locally but not yet written back and with the EOF position on the server short of the local EOF position.

Note that this will also affect afs and 9p, particularly with regard to direct I/O writes.

And finally, here's an adjustment to debugging statements:

(6) Adjust three debugging output statements. Not strictly a fix, so could be dropped. Including the subreq ID in some extra debug lines helps a bit, though.

The patches can also be found here:

https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes

Thanks,
David

David Howells (6):
cifs: Fix lack of credit renegotiation on read retry netfs, cifs: Fix handling of short DIO read
cifs: Fix copy offload to flush destination region
mm: Fix filemap_invalidate_inode() to use
invalidate_inode_pages2_range()
cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target
region
netfs, cifs: Improve some debugging bits

 fs/netfs/io.c            | 21 +++++++++++++-------
 fs/smb/client/cifsfs.c   | 21 ++++----------------
 fs/smb/client/cifsglob.h |  1 +
 fs/smb/client/file.c     | 37 ++++++++++++++++++++++++++++++++----
 fs/smb/client/smb2ops.c  | 26 +++++++++++++++++++------
 fs/smb/client/smb2pdu.c  | 41 +++++++++++++++++++++++++---------------
 fs/smb/client/trace.h    |  1 +
 include/linux/netfs.h    |  1 +
 mm/filemap.c             |  2 +-
 9 files changed, 101 insertions(+), 50 deletions(-)