From: Moritz M <mailinglist@moritzmueller.ee>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: Possible timeout problem when opening a file twice on a SMB mount
Date: Wed, 25 Sep 2019 21:23:04 +0200 [thread overview]
Message-ID: <b7b7a790feac88d59fe00c9ca2f5960d@moritzmueller.ee> (raw)
In-Reply-To: <CAKywueQUuwRK7hbbJhdquVVPre2+8GBCvnrG76L-KodoMm9m6g@mail.gmail.com>
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
next prev parent reply other threads:[~2019-09-25 19:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 10:57 Possible timeout problem when opening a file twice on a SMB mount Moritz M
2019-09-20 23:26 ` Pavel Shilovsky
2019-09-23 14:04 ` Moritz M
2019-09-24 18:11 ` ronnie sahlberg
2019-09-24 19:05 ` Pavel Shilovsky
2019-09-24 21:06 ` Pavel Shilovsky
2019-09-25 19:23 ` Moritz M [this message]
2019-09-25 20:54 ` Pavel Shilovsky
2019-09-26 10:53 ` Moritz M
2019-09-26 18:58 ` Pavel Shilovsky
2019-10-30 13:26 ` Moritz M
2019-10-30 21:51 ` Pavel Shilovsky
2019-10-31 9:20 ` Moritz M
2019-10-31 21:01 ` Pavel Shilovsky
2019-09-24 19:33 ` Moritz M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7b7a790feac88d59fe00c9ca2f5960d@moritzmueller.ee \
--to=mailinglist@moritzmueller.ee \
--cc=linux-cifs@vger.kernel.org \
--cc=piastryyy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox