Skip to contentSkip to conversation

Simplify demultiplex thread

PATCH Superseded Pavel Shilovsky 2 participants 3 messages Jul 24, 2011 – Jul 26, 2011 2 messages not in the archive

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover Simplify demultiplex thread

This patchset is going to make demultiplex code smaller and let us intergrate SMB2 protocol support easier further.

I successfully tested it with Connectathon Testsuites and two parallel mount/umount scripts.

This is the 4rd version of the patchset that includes minor changes for patch #1.

Pavel Shilovsky (5):
CIFS: Move buffer allocation to a separate function
CIFS: Simplify socket reading in demultiplex thread
CIFS: Move RFC1002 check to a separate function
CIFS: Move mid search to a separate function
CIFS: Cleanup demupltiplex thread exiting code

 fs/cifs/connect.c |  653 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 346 insertions(+), 307 deletions(-)

A message that is not in the archive (sent off-list or not yet received): 1311519630-2500-1-git-send-email-piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 14 lines · On Sun, 24 Jul 2011 19:00:30 +0400 Pavel Shilovsky…

This patchset is going to make demultiplex code smaller and let us intergrate SMB2 protocol support easier further.

I successfully tested it with Connectathon Testsuites and two parallel mount/umount scripts.

This is the 4rd version of the patchset that includes minor changes for patch #1.

Pavel Shilovsky (5):
CIFS: Move buffer allocation to a separate function
CIFS: Simplify socket reading in demultiplex thread
CIFS: Move RFC1002 check to a separate function
CIFS: Move mid search to a separate function
CIFS: Cleanup demupltiplex thread exiting code

Quoted 7 lines
 fs/cifs/connect.c |  653 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 346 insertions(+), 307 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

This patchset seems like a good start. It does have some warts...

static int
+read_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg,
+ struct kvec *iov, unsigned int to_read,
+ unsigned int *ptotal_read, bool is_header_read)

...that is_header_read parm could probably be done away with by moving the special handling into the caller. Making these routines more general purpose would be preferable.

That said, it's still a good starting point for future cleanup, so I'm inclined to ACK the set. I also ran it through some basic smoke testing and didn't see any problems.

Reviewed-and-Tested-by Jeff Layton <[email protected]>

A message that is not in the archive (sent off-list or not yet received): 20110726081400.6a7ed834-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org

#4 lore raw

2011/7/26 Jeff Layton <[email protected]>:

Quoted 33 lines
Quoted 14 lines · On Sun, 24 Jul 2011 19:00:30 +0400 Pavel Shilovsky…

This patchset is going to make demultiplex code smaller and let us intergrate SMB2 protocol support easier further.

I successfully tested it with Connectathon Testsuites and two parallel mount/umount scripts.

This is the 4rd version of the patchset that includes minor changes for patch #1.

Pavel Shilovsky (5):
  CIFS: Move buffer allocation to a separate function
  CIFS: Simplify socket reading in demultiplex thread
  CIFS: Move RFC1002 check to a separate function
  CIFS: Move mid search to a separate function
  CIFS: Cleanup demupltiplex thread exiting code

Quoted 7 lines

 fs/cifs/connect.c |  653 ++++++++++++++++++++++++++++-------------------------

 1 files changed, 346 insertions(+), 307 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

This patchset seems like a good start. It does have some warts...

 static int
+read_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg,
+                struct kvec *iov, unsigned int to_read,
+                unsigned int *ptotal_read, bool is_header_read)

Quoted 3 lines

...that is_header_read parm could probably be done away with by moving the special handling into the caller. Making these routines more general purpose would be preferable.

I agree - it is a good thing for further work with demultiplex thread.

Quoted 7 lines

That said, it's still a good starting point for future cleanup, so I'm inclined to ACK the set. I also ran it through some basic smoke testing and didn't see any problems.

Reviewed-and-Tested-by Jeff Layton <[email protected]>

Thank you for testing this! Note, that this patchset is also a starting point for SMB2 support integration and merging this now makes this process easier.

Signature · 2 lines
Best regards,
Pavel Shilovsky.