From: ronnie sahlberg <ronniesahlberg@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: CIFS <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>
Subject: Re: [PATCH] smb3: log warning if CSC policy conflicts with linux kernel client cache mount option
Date: Wed, 4 Sep 2019 09:00:33 +1000 [thread overview]
Message-ID: <CAN05THSp4vOHiZ7jqdVfLSbN2HD8nzEkq5aU_NSGVFFM2_4wTg@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mtzztgoW91TvG_wTYju10dNJ+=r8Ncx3f3bebstMZiCpA@mail.gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
On Wed, Sep 4, 2019 at 8:54 AM Steve French <smfrench@gmail.com> wrote:
>
> If the server config (e.g. Samba smb.conf "csc policy = disable)
> for the share indicates that the share should not be cached, log
> a warning message in the Linux kernel client if forced client side
> caching ("cache=ro" or "cache=singleclient") was requested on mount.
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> ---
> fs/cifs/connect.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index d9a995588c74..85f8d943a05a 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -3478,6 +3478,14 @@ cifs_get_tcon(struct cifs_ses *ses, struct
> smb_vol *volume_info)
> tcon->use_resilient = true;
> }
>
> + /* If the user really knows what they are doing they can override */
> + if (tcon->share_flags & SMB2_SHAREFLAG_NO_CACHING) {
> + if (volume_info->cache_ro)
> + cifs_dbg(VFS, "cache=ro requested on mount but NO_CACHING
> flag set on share\n");
> + else if (volume_info->cache_rw)
> + cifs_dbg(VFS, "cache=singleclient requested on mount but
> NO_CACHING flag set on share\n");
> + }
> +
> /*
> * We can have only one retry value for a connection to a share so for
> * resources mounted more than once to the same server share the last
>
> --
> Thanks,
>
> Steve
prev parent reply other threads:[~2019-09-03 23:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 22:54 [PATCH] smb3: log warning if CSC policy conflicts with linux kernel client cache mount option Steve French
2019-09-03 23:00 ` ronnie sahlberg [this message]
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=CAN05THSp4vOHiZ7jqdVfLSbN2HD8nzEkq5aU_NSGVFFM2_4wTg@mail.gmail.com \
--to=ronniesahlberg@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@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;
as well as URLs for NNTP newsgroup(s).