Skip to content

cifs: remove rfc1002 header from all smb2 requests

Ronnie Sahlberg linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19cifs: Add SendReceive3fs/cifs/cifsproto.h fs/cifs/transport.c+42 -05 replies
2/19cifs: remove rfc1002 header from smb2_negotiate_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+12 -160 replies
3/19cifs: remove rfc1002 header from smb2_logoff_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+14 -50 replies
4/19cifs: remove rfc1002 header from smb2_tree_disconnect_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+13 -30 replies
5/19cifs: remove rfc1002 header from smb2_close_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+5 -50 replies
6/19cifs: remove rfc1002 header from smb2_ioctl_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+11 -120 replies
7/19cifs: remove rfc1002 header from smb2_echo_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+9 -70 replies
8/19cifs: remove rfc1002 header from smb2_sess_setup_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+14 -150 replies
9/19cifs: remove rfc1002 header from smb2_tree_connect_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+10 -100 replies
10/19cifs: remove rfc1002 header from smb2_create_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+12 -190 replies
11/19cifs: remove rfc1002 header from smb2_flush_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+5 -50 replies
12/19cifs: remove rfc1002 header from smb2_lock_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+6 -70 replies
13/19cifs: remove rfc1002 header from smb2 read/write requestsfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+21 -230 replies
14/19cifs: remove rfc1002 header from smb2_lease_ackfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+15 -50 replies
15/19cifs: remove rfc1002 header from smb2_oplock_break we get from serverfs/cifs/smb2misc.c fs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+29 -60 replies
16/19cifs: remove rfc1002 header from smb2_set_info_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+9 -110 replies
17/19cifs: remove rfc1002 header from smb2_query_directory_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+8 -80 replies
18/19cifs: remove rfc1002 header from smb2_query_info_reqfs/cifs/smb2pdu.c fs/cifs/smb2pdu.h+14 -130 replies
19/19cifs: remove small_smb2_initfs/cifs/smb2pdu.c+6 -470 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/19] cifs: remove rfc1002 header from all smb2 requests

Steve, all

I split the !1002 patch into a small serie for easier review.

This patch series removes the NBSS 4 byte header from all the smb2 request structures.
Instead of computing and tweaking the header as part of composing the SMB2 request, we now compute it in the new SendReceive3() function that is used by all of SMB2.

This eliminates a huge amount of magic +4 / -4 in the code and all the ugly inc_rfc1002.... stuff where the old code would constantly tweak the length field as it was building the PDU.

So overall it also simplifies the code in some places I think.

This series is to prepare for and make it easier to add smb2 compounding in the future as then we will need to construct multiple SMB2 pdus and wrap them all insode one single rfc1002 header.

As a later series, before we get to the actual compounding, I plan to do a similar change to all the reply structures and remove the rfc1002 header from them all too.

Please review, and test.