Re: [PATCH v3 10/16] CIFS: Use multicredits for SMB 2.1/3 writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel, that would be fine


On Tue, Jul 29, 2014 at 2:56 AM, Pavel Shilovsky <pshilovsky@xxxxxxxxx> wrote:
> 2014-07-28 11:36 GMT+04:00 Pavel Shilovsky <pshilovsky@xxxxxxxxx>:
>> 2014-07-25 5:06 GMT+04:00 Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>:
>>> Looks correct.
>>>
>>> Reviewed-by: Shirish Pargaonkar <spargaonkar@xxxxxxxx>
>>
>> Thank you for reviewing the series!
>>
>>> Only  comment would be, wish there was a mnemonic/define for
>>> a regular op  when calling add_credits_and_wake_if() for optype
>>> such as CIFS_ECHO_OP or CIFS_OPBREAK_OP instead of 0.
>>
>> Yes, it can make sense but should be in another patch/series.
>>
>>> Oh and super nitpick...  s/reseted/reset/.
>>
>> Ok, will fix it in my smb2-dev branch on git.altlinux.org.
>>
>> --
>> Best regards,
>> Pavel Shilovsky.
>
> Shirish,
>
> I am going to add a check (as well as removing an unnecessary comment)
> to write part:
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 081529f..0dbd1de 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -230,6 +230,9 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon,
> struct smb_vol *volume_info)
>         wsize = volume_info->wsize ? volume_info->wsize : CIFS_DEFAULT_IOSIZE;
>         wsize = min_t(unsigned int, wsize, server->max_write);
>
> +       if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
> +               wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
> +
>         return wsize;
>  }
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 3acef4b..5a6842c 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -108,7 +108,6 @@ smb2_hdr_assemble(struct smb2_hdr *hdr, __le16
> smb2_cmd /* command */ ,
>         if (!tcon)
>                 goto out;
>
> -       /* BB FIXME when we do write > 64K add +1 for every 64K in req or rsp */
>         /* GLOBAL_CAP_LARGE_MTU will only be set if dialect > SMB2.02 */
>         /* See sections 2.2.4 and 3.2.4.1.5 of MS-SMB2 */
>         if ((tcon->ses) &&
>
> and the same check to read part:
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 0dbd1de..d0210a8 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -246,6 +246,9 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon,
> struct smb_vol *volume_info)
>         rsize = volume_info->rsize ? volume_info->rsize : CIFS_DEFAULT_IOSIZE;
>         rsize = min_t(unsigned int, rsize, server->max_read);
>
> +       if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
> +               rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
> +
>         return rsize;
>  }
>
> If you are ok with the changes I will update 10/16 and 16/16 patches
> and leave your Reviewed-by tags in my git tree. Thoughts?
>
> --
> Best regards,
> Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux