Re: Possible timeout problem when opening a file twice on a SMB mount

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

 



Please update the thread once you verify the patch with the other
software you mentioned.

It works as expected. Issue is gone. Thanks a lot.

If it works fine, I will prepare a formal
patch for the mainline and active stable kernels.

As I'm not familiar with the kernel development cycle: how long will
it usually take for a patch to be included in the kernel?

Which are the active stable kernels?

Best Regards
Moritz

ср, 25 сент. 2019 г. в 12:23, Moritz M <mailinglist@xxxxxxxxxxxxxxxx>:


Thanks Pavel.
After messing around with the Kernel build procedure on my distro and
adapting the patch slightly (filenumbers did not match) I got a working
cifs module. And it solved the issue at least for the python test.

I'll check tomorrow the other software where it occured.

>>
> Could you try the following patch in your setup to see if it fixes the
> problem?
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 047066493832..00d2ac80cd6e 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -3314,6 +3314,11 @@ smb21_set_oplock_level(struct cifsInodeInfo
> *cinode, __u32 oplock,
>         if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
>                 return;
>
> +       /* Check if the server granted an oplock rather than a lease */
> +       if (oplock & SMB2_OPLOCK_LEVEL_EXCLUSIVE)
> +               return smb2_set_oplock_level(cinode, oplock, epoch,
> +                                            purge_cache);
> +
>         if (oplock & SMB2_LEASE_READ_CACHING_HE) {
>                 new_oplock |= CIFS_CACHE_READ_FLG;
>                 strcat(message, "R");
>
>
> --
> Best regards,
> Pavel Shilovsky



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

  Powered by Linux