From: David Howells <dhowells@redhat.com>
To: Steve French <sfrench@samba.org>
Cc: David Howells <dhowells@redhat.com>,
Paulo Alcantara <pc@manguebit.org>,
Shyam Prasad N <sprasad@microsoft.com>,
linux-cifs@vger.kernel.org, netfs@lists.linux.dev,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/9] netfs: Miscellaneous prep patches for rewrite of I/O layer
Date: Thu, 20 Nov 2025 15:25:13 +0000 [thread overview]
Message-ID: <20251120152524.2711660-1-dhowells@redhat.com> (raw)
Hi Steve,
Could you consider taking these patches extracted from my I/O layer rewrite
for the upcoming merge window. The performance change should be neutral,
but it cleans up the code a bit.
(1) Add the smb3_read_* tracepoints to SMB1 as well as SMB2/3.
(2) Use netfs_alloc/free_folioq_buffer() rather than cifs doing its own
version.
(3) Rename struct mid_q_entry to smb_message. In my rewrite, smb_message
will get allocated in the marshalling functions in smb2pdu.c and
cifssmb.c rather than in transport.c and used to hand parameters down
- and so I think it could be better named for that.
(4) Remove the RFC1002 header from the smb_hdr struct so that it's
consistent with SMB2/3. This allows I/O routines to be simplified and
shared.
(5) Make SMB1's SendReceive() wrap cifs_send_recv() and thus share code
with SMB2/3.
(6) Clean up a bunch of extra kvec[] that were required for RFC1002
headers from SMB1's header struct.
(7) Replace SendReceiveBlockingLock() with SendReceive() plus flags.
(8) Remove the server pointer from smb_message. It can be passed down
from the caller to all places that need it.
(9) Don't need state locking in smb2_get_mid_entry() as we're just doing a
single read inside the lock. READ_ONCE() should suffice instead.
The patches can be found here also:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-next
Thanks,
David
Changes
=======
ver #2)
- Rebased on the ksmbd-for-next-next branch.
- Moved the patch to use netfs_alloc/free_folioq_buffer() down the stack.
David Howells (9):
cifs: Add the smb3_read_* tracepoints to SMB1
cifs: Use netfs_alloc/free_folioq_buffer()
cifs: Rename mid_q_entry to smb_message
cifs: Remove the RFC1002 header from smb_hdr
cifs: Make smb1's SendReceive() wrap cifs_send_recv()
cifs: Clean up some places where an extra kvec[] was required for
rfc1002
cifs: Replace SendReceiveBlockingLock() with SendReceive() plus flags
cifs: Remove the server pointer from smb_message
cifs: Don't need state locking in smb2_get_mid_entry()
fs/smb/client/cifs_debug.c | 47 +-
fs/smb/client/cifs_debug.h | 2 +-
fs/smb/client/cifsencrypt.c | 72 +--
fs/smb/client/cifsfs.c | 31 +-
fs/smb/client/cifsglob.h | 92 ++--
fs/smb/client/cifspdu.h | 2 +-
fs/smb/client/cifsproto.h | 76 ++--
fs/smb/client/cifssmb.c | 806 +++++++++++++++++++---------------
fs/smb/client/cifstransport.c | 432 +++---------------
fs/smb/client/connect.c | 188 ++++----
fs/smb/client/misc.c | 32 +-
fs/smb/client/netmisc.c | 15 +-
fs/smb/client/sess.c | 8 +-
fs/smb/client/smb1ops.c | 113 +++--
fs/smb/client/smb2misc.c | 11 +-
fs/smb/client/smb2ops.c | 206 +++------
fs/smb/client/smb2pdu.c | 48 +-
fs/smb/client/smb2proto.h | 12 +-
fs/smb/client/smb2transport.c | 111 +++--
fs/smb/client/transport.c | 281 ++++++------
fs/smb/common/smb2pdu.h | 3 -
fs/smb/common/smbglob.h | 1 -
22 files changed, 1159 insertions(+), 1430 deletions(-)
next reply other threads:[~2025-11-20 15:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 15:25 David Howells [this message]
2025-11-20 15:25 ` [PATCH v2 1/9] cifs: Add the smb3_read_* tracepoints to SMB1 David Howells
2025-11-21 12:55 ` Paulo Alcantara
2025-11-20 15:25 ` [PATCH v2 2/9] cifs: Use netfs_alloc/free_folioq_buffer() David Howells
2025-11-20 15:25 ` [PATCH v2 3/9] cifs: Rename mid_q_entry to smb_message David Howells
2025-11-20 15:25 ` [PATCH v2 4/9] cifs: Remove the RFC1002 header from smb_hdr David Howells
2025-11-20 15:25 ` [PATCH v2 5/9] cifs: Make smb1's SendReceive() wrap cifs_send_recv() David Howells
2025-11-20 15:25 ` [PATCH v2 6/9] cifs: Clean up some places where an extra kvec[] was required for rfc1002 David Howells
2025-11-20 15:25 ` [PATCH v2 7/9] cifs: Replace SendReceiveBlockingLock() with SendReceive() plus flags David Howells
2025-11-20 15:25 ` [PATCH v2 8/9] cifs: Remove the server pointer from smb_message David Howells
2025-11-20 15:25 ` [PATCH v2 9/9] cifs: Don't need state locking in smb2_get_mid_entry() David Howells
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=20251120152524.2711660-1-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
/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).