linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	Stefan Metzmacher <metze@samba.org>, Tom Talpey <tom@talpey.com>,
	linux-cifs@vger.kernel.org, netfs@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 0/9] cifs: Miscellaneous prep patches for rewrite of I/O layer
Date: Mon,  1 Dec 2025 22:57:21 +0000	[thread overview]
Message-ID: <20251201225732.1520128-1-dhowells@redhat.com> (raw)

Hi Steve,

Could you take 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) 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.

 (2) Make SMB1's SendReceive() wrap cifs_send_recv() and thus share code
     with SMB2/3.

 (3) Clean up a bunch of extra kvec[] that were required for RFC1002
     headers from SMB1's header struct.

 (4) Replace SendReceiveBlockingLock() with SendReceive() plus flags.

 (5) Change the mid_*_t function pointers to have the pointer in the typedef
     as is more normal rather than at the point of use.

 (6) Remove the server pointer from smb_message.  It can be passed down
     from the caller to all places that need it.

 (7) 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.

 (8) Add a tracepoint to log EIO errors and up to a couple of bits of info
     for each to make it easier to find out why an EIO error happened when
     the system is very busy without introducing printk delays.

 (9) Make some minor code cleanups.

The patches will be found here also when the git server is accessible
again:

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

Thanks,
David

Changes
=======
ver #6)
 - Remove the patch to rename mid_q_entry.
 - Add a patch to normalise the func pointer typedefs.

ver #5)
 - Rebased on the ksmbd-for-next branch.
 - Drop the netfs_alloc patch as that's now taken.
 - Added a warning check requested by Stefan Metzmacher.
 - Switched to a branch without the header prototype cleanups.
 - Add a patch to make some minor code cleanups.
 - Don't do EIO changed in smbdirect.c as that interferes with Stefan's
   changes.

ver #4)
 - Rebased on the ksmbd-for-next branch.
 - The read tracepoint patch got merged, so drop it.
 - Move the netfs_alloc, etc. patch first.
 - Fix a couple of prototypes that need to be conditional (may need some
   post cleanup).
 - Fixed another couple of headers that needed their own prototype lists.
 - Fixed #include order in a couple of places.

ver #3)
 - Rebased on the ksmbd-for-next branch.
 - Add the patches to clean up the function prototypes in the headers.
   - Don't touch smbdirect.
   - Put prototypes into netlink.h and cached_dir.h rather than
     centralising them.
   - Indent the arguments in the prototypes to the opening bracket + 1.
 - Cleaned up most other checkpatch complaints.
 - Added the EIO tracepoint patch to the end.

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: 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: Fix specification of function pointers
  cifs: Remove the server pointer from smb_message
  cifs: Don't need state locking in smb2_get_mid_entry()
  cifs: Add a tracepoint to log EIO errors
  cifs: Do some preparation prior to organising the function
    declarations

 fs/smb/client/cached_dir.c    |   2 +-
 fs/smb/client/cifs_debug.c    |  14 +-
 fs/smb/client/cifs_debug.h    |   6 +-
 fs/smb/client/cifs_spnego.h   |   2 -
 fs/smb/client/cifs_unicode.h  |   3 -
 fs/smb/client/cifsacl.c       |  10 +-
 fs/smb/client/cifsencrypt.c   |  83 +---
 fs/smb/client/cifsfs.c        |  12 +-
 fs/smb/client/cifsglob.h      | 151 ++----
 fs/smb/client/cifspdu.h       |   2 +-
 fs/smb/client/cifsproto.h     | 194 ++++++--
 fs/smb/client/cifssmb.c       | 913 +++++++++++++++++++---------------
 fs/smb/client/cifstransport.c | 382 ++------------
 fs/smb/client/compress.c      |  23 +-
 fs/smb/client/compress.h      |  19 +-
 fs/smb/client/connect.c       |  81 ++-
 fs/smb/client/dir.c           |   8 +-
 fs/smb/client/dns_resolve.h   |   4 -
 fs/smb/client/file.c          |   6 +-
 fs/smb/client/fs_context.c    |   2 +-
 fs/smb/client/inode.c         |  14 +-
 fs/smb/client/link.c          |  10 +-
 fs/smb/client/misc.c          |  53 +-
 fs/smb/client/netmisc.c       |  11 +-
 fs/smb/client/readdir.c       |   2 +-
 fs/smb/client/reparse.c       |  53 +-
 fs/smb/client/sess.c          |  16 +-
 fs/smb/client/smb1ops.c       |  78 ++-
 fs/smb/client/smb2file.c      |   9 +-
 fs/smb/client/smb2inode.c     |  13 +-
 fs/smb/client/smb2maperror.c  |   6 +-
 fs/smb/client/smb2misc.c      |   3 +-
 fs/smb/client/smb2ops.c       |  78 +--
 fs/smb/client/smb2pdu.c       | 208 ++++----
 fs/smb/client/smb2proto.h     |   4 +-
 fs/smb/client/smb2transport.c |  59 +--
 fs/smb/client/trace.h         | 149 ++++++
 fs/smb/client/transport.c     | 179 +++----
 fs/smb/client/xattr.c         |   2 +-
 fs/smb/common/smb2pdu.h       |   3 -
 fs/smb/common/smbglob.h       |   1 -
 41 files changed, 1463 insertions(+), 1405 deletions(-)


             reply	other threads:[~2025-12-01 22:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 22:57 David Howells [this message]
2025-12-01 22:57 ` [PATCH v6 1/9] cifs: Remove the RFC1002 header from smb_hdr David Howells
2025-12-01 22:57 ` [PATCH v6 2/9] cifs: Make smb1's SendReceive() wrap cifs_send_recv() David Howells
2025-12-01 22:57 ` [PATCH v6 3/9] cifs: Clean up some places where an extra kvec[] was required for rfc1002 David Howells
2025-12-01 22:57 ` [PATCH v6 4/9] cifs: Replace SendReceiveBlockingLock() with SendReceive() plus flags David Howells
2025-12-01 22:57 ` [PATCH v6 5/9] cifs: Fix specification of function pointers David Howells
2025-12-01 22:57 ` [PATCH v6 6/9] cifs: Remove the server pointer from smb_message David Howells
2025-12-01 22:57 ` [PATCH v6 7/9] cifs: Don't need state locking in smb2_get_mid_entry() David Howells
2025-12-01 22:57 ` [PATCH v6 8/9] cifs: Add a tracepoint to log EIO errors David Howells
2025-12-01 22:57 ` [PATCH v6 9/9] cifs: Do some preparation prior to organising the function declarations David Howells
2025-12-02  1:04 ` [PATCH v6 0/9] cifs: Miscellaneous prep patches for rewrite of I/O layer Steve French
2025-12-02  7:15 ` 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=20251201225732.1520128-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=metze@samba.org \
    --cc=netfs@lists.linux.dev \
    --cc=pc@manguebit.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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).