[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250623124835.1106414-1-dhowells@redhat.com>
Date: Mon, 23 Jun 2025 13:48:20 +0100
From: David Howells <dhowells@...hat.com>
To: Christian Brauner <christian@...uner.io>,
Steve French <sfrench@...ba.org>
Cc: David Howells <dhowells@...hat.com>,
Paulo Alcantara <pc@...guebit.com>,
netfs@...ts.linux.dev,
linux-afs@...ts.infradead.org,
linux-cifs@...r.kernel.org,
linux-nfs@...r.kernel.org,
ceph-devel@...r.kernel.org,
v9fs@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 00/11] netfs, cifs: Fixes to retry-related code
Hi Christian, Steve,
Here are some miscellaneous fixes and changes for netfslib and cifs, if you
could consider pulling them. Some or all of them might be better going
through the cifs tree as the effects were most noticeable there. These
were primarily found because a bug in Samba was causing smbd to crash and
restart after about 1-2s and this was vigorously and abruptly exercising
the netfslib retry paths.
First, there are some netfs fixes:
(1) Fix a hang due to missing case in final DIO read result collection
not breaking out of a loop if the request finished, but there were no
subrequests being processed and NETFS_RREQ_ALL_QUEUED wasn't yet set.
(2) Fix a double put of the netfs_io_request struct if completion happened
in the pause loop.
(3) Provide some helpers to abstract out NETFS_RREQ_IN_PROGRESS flag
wrangling.
(4) Fix infinite looping in netfs_wait_for_pause/request() which wa caused
by a loop waiting for NETFS_RREQ_ALL_QUEUED to get set - but which
wouldn't get set until the looping function returned. This uses patch
(3) above.
(5) Fix a ref leak on an extra subrequest inserted into a request's list
of subreqs because more subreq records were needed for retrying than
were needed for the original request (say, for instance, that the
amount of cifs credit available was reduced and, subsequently, the ops
had to be smaller).
Then a bunch of cifs fixes:
(6) cifs: Fix missing wsize negotiation.
(7-9) cifs: Fix various RPC callbacks to set NETFS_SREQ_NEED_RETRY if a
subrequest fails retriably.
And finally a couple of patches to improve tracing output, but that should
otherwise not affect functionality:
(10) Renumber the NETFS_RREQ_* flags to make the hex values easier to
interpret by eye, including moving the main status flags down to the
lowest bits, with IN_PROGRESS in bit 0.
(11) Update the tracepoints in a number of ways, including adding more
tracepoints into the cifs read/write RPC callback so that differend
MID_RESPONSE_* values can be differentiated.
Those last two could wait for the next merge window.
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 (8):
netfs: Fix hang due to missing case in final DIO read result
collection
netfs: Put double put of request
netfs: Provide helpers to perform NETFS_RREQ_IN_PROGRESS flag wangling
netfs: Fix looping in wait functions
netfs: Fix ref leak on inserted extra subreq in write retry
cifs: Fix prepare_write to negotiate wsize if needed
netfs: Renumber the NETFS_RREQ_* flags to make traces easier to read
netfs: Update tracepoints in a number of ways
Paulo Alcantara (3):
smb: client: set missing retry flag in smb2_writev_callback()
smb: client: set missing retry flag in cifs_readv_callback()
smb: client: set missing retry flag in cifs_writev_callback()
fs/netfs/direct_write.c | 1 -
fs/netfs/internal.h | 20 ++++++++++++++-
fs/netfs/main.c | 6 ++---
fs/netfs/misc.c | 50 ++++++++++++++++++++++--------------
fs/netfs/read_collect.c | 16 ++++++++----
fs/netfs/write_collect.c | 8 +++---
fs/netfs/write_retry.c | 3 +--
fs/smb/client/cifssmb.c | 22 ++++++++++++++++
fs/smb/client/file.c | 8 ++++--
fs/smb/client/smb2pdu.c | 27 ++++++++++++++++---
include/linux/netfs.h | 20 +++++++--------
include/trace/events/netfs.h | 29 ++++++++++++++-------
12 files changed, 151 insertions(+), 59 deletions(-)
Powered by blists - more mailing lists