Skip to content

netfs, cifs: DIO read and read-retry 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 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2cifs: Fix lack of credit renegotiation on read retryfs/netfs/io.c fs/smb/client/cifsglob.h fs/smb/client/file.c +1 more+44 -150 replies
2/2netfs, cifs: Fix handling of short DIO readfs/netfs/io.c fs/smb/client/smb2pdu.c include/linux/netfs.h+26 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] netfs, cifs: DIO read and read-retry fixes

Hi Christian, Steve,

Here are a couple of 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.

These were both accessible by simply trying to do a DIO read of a remote file where the read was larger than the file.

Note that (2) might also apply to other netfslib-using filesystems.

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 (2):
cifs: Fix lack of credit renegotiation on read retry netfs, cifs: Fix handling of short DIO read

 fs/netfs/io.c            | 19 ++++++++++++------
 fs/smb/client/cifsglob.h |  1 +
 fs/smb/client/file.c     | 28 ++++++++++++++++++++++----
 fs/smb/client/smb2pdu.c  | 43 +++++++++++++++++++++++++++++-----------
 include/linux/netfs.h    |  1 +
 5 files changed, 70 insertions(+), 22 deletions(-)