[PATCH] cifs: Changes made to crediting code to make debugging easier.

Aurélien Aptel aaptel at suse.com
Mon Feb 1 10:43:00 UTC 2021


Shyam Prasad N <nspmangalore at gmail.com> writes:
> Specifically, I keen on your views on the following:
> @@ -1159,7 +1181,9 @@ compound_send_recv(const unsigned int xid,
> struct cifs_ses *ses,
>         /*
>          * Compounding is never used during session establish.
>          */
> -       if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP))
> +       if ((ses->status == CifsNew) ||
> +                       (optype & CIFS_NEG_OP) ||
> +                       (optype & CIFS_SESS_OP))
>                 smb311_update_preauth_hash(ses, rqst[0].rq_iov,
>                                            rqst[0].rq_nvec);
>
> @@ -1224,7 +1248,9 @@ compound_send_recv(const unsigned int xid,
> struct cifs_ses *ses,
>         /*
>          * Compounding is never used during session establish.
>          */
> -       if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP)) {
> +       if ((ses->status == CifsNew) ||
> +                       (optype & CIFS_NEG_OP) ||
> +                       (optype & CIFS_SESS_OP)) {
>                 struct kvec iov = {
>                         .iov_base = resp_iov[0].iov_base,
>                         .iov_len = resp_iov[0].iov_len

preauth should be updated for both negprot and sess_setup (except last
response from server) so that looks correct. But ses->status will be
CifsNew until its fully established (covering the SESS scenario) so this
shouldn't change anything. You can test this code path by mounting with
vers=3.1.1 with and without multichannel.

Also there are no 80 columns limit anymore, I think it's more readable
as 1 line.

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




More information about the samba-technical mailing list