linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel@suse.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: Steve French <smfrench@gmail.com>, CIFS <linux-cifs@vger.kernel.org>
Subject: Re: [RFC][SMB3][PATCH] Allow share to be mounted with "cache=ro" if immutable share
Date: Wed, 28 Aug 2019 12:54:09 +0200	[thread overview]
Message-ID: <87ef15lfvy.fsf@suse.com> (raw)
In-Reply-To: <CAN05THSPmp3GtZifXK-mLtVntgQR0uwaYY-c5LS9Dhf_P78grA@mail.gmail.com>

"ronnie sahlberg" <ronniesahlberg@gmail.com> writes:
> You also have the magic happening in:
> -#define CIFS_CACHE_READ(cinode) (cinode->oplock & CIFS_CACHE_READ_FLG)
> +#define CIFS_CACHE_READ(cinode) ((cinode->oplock &
> CIFS_CACHE_READ_FLG) ||
> (CIFS_SB(cinode->vfs_inode.i_sb)->mnt_cifs_flags &
> CIFS_MOUNT_RO_CACHE))

Ah thanks, I didn't notice that part.

> which makes things work. Still I would want this to be driven by
> whether the server returns "this share is WRITEABLE or  not" flag
> instead of a mount option.
> A mount option only invites people to "I use this because it makes
> thing faster"  then "why do my files look corrupted sometimes" ?

That's true but there are situations where it would be handy. Imagine
mounting //host/non_ro_share/sub/path/ro_folder i.e. mounting a folder
that you know won't change within a share that can change.

I guess this hints at a more granular cache mode.

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)

  reply	other threads:[~2019-08-28 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  5:02 [RFC][SMB3][PATCH] Allow share to be mounted with "cache=ro" if immutable share Steve French
2019-08-28  6:11 ` ronnie sahlberg
2019-08-28 10:20 ` Aurélien Aptel
2019-08-28 10:27   ` ronnie sahlberg
2019-08-28 10:54     ` Aurélien Aptel [this message]
2019-08-28 22:17     ` Steve French

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=87ef15lfvy.fsf@suse.com \
    --to=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --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).