Linux-CIFS Archive on
 help / color / Atom feed
From: ronnie sahlberg <>
To: "Aurélien Aptel" <>
Cc: Steve French <>, CIFS <>
Subject: Re: [RFC][SMB3][PATCH] Allow share to be mounted with "cache=ro" if immutable share
Date: Wed, 28 Aug 2019 20:27:32 +1000
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, Aug 28, 2019 at 8:21 PM Aurélien Aptel <> wrote:
> "Steve French" <> writes:
> > Increases performance a lot in cases where we know that the share is
> > not changing
> This is just adding the parsing of the option but it sounds like a good idea.

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_SB(cinode->vfs_inode.i_sb)->mnt_cifs_flags &

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" ?

> > +#define CIFS_MOUNT_RO_CACHE  0x20000000  /* assumes share will not change */
> This flag probably needs to be added to CIFS_MOUNT_MASK: if one cifs sb
> is using that flag, it should only be reused for new mounts that also
> require that flag.
> 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 index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  5:02 Steve French
2019-08-28  6:11 ` ronnie sahlberg
2019-08-28 10:20 ` Aurélien Aptel
2019-08-28 10:27   ` ronnie sahlberg [this message]
2019-08-28 10:54     ` Aurélien Aptel
2019-08-28 22:17     ` Steve French

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-CIFS Archive on

Archives are clonable:
	git clone --mirror linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ \
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox