From: David Howells <dhowells@redhat.com>
To: Christian Brauner <christian@brauner.io>
Cc: David Howells <dhowells@redhat.com>,
Pankaj Raghav <p.raghav@samsung.com>,
Jeff Layton <jlayton@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
netfs@lists.linux.dev, linux-afs@lists.infradead.org,
linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
ceph-devel@vger.kernel.org, v9fs@lists.linux.dev,
linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] netfs, cifs: DIO read and read-retry fixes
Date: Thu, 22 Aug 2024 23:06:47 +0100 [thread overview]
Message-ID: <20240822220650.318774-1-dhowells@redhat.com> (raw)
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(-)
next reply other threads:[~2024-08-22 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 22:06 David Howells [this message]
2024-08-22 22:06 ` [PATCH 1/2] cifs: Fix lack of credit renegotiation on read retry David Howells
2024-08-22 22:06 ` [PATCH 2/2] netfs, cifs: Fix handling of short DIO read David Howells
2024-08-23 12:39 ` [PATCH 0/2] netfs, cifs: DIO read and read-retry fixes Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240822220650.318774-1-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=christian@brauner.io \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=p.raghav@samsung.com \
--cc=v9fs@lists.linux.dev \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).