linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "jlayton@kernel.org" <jlayton@kernel.org>,
	"amir73il@gmail.com" <amir73il@gmail.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
	"samba-technical@lists.samba.org"
	<samba-technical@lists.samba.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"Volker.Lendecke@sernet.de" <Volker.Lendecke@sernet.de>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"pshilov@microsoft.com" <pshilov@microsoft.com>
Subject: Re: Better interop for NFS/SMB file share mode/reservation
Date: Sun, 28 Apr 2019 15:06:13 +0000	[thread overview]
Message-ID: <1d5265510116ece75d6eb7af6314e6709e551c6e.camel@hammerspace.com> (raw)
In-Reply-To: <CAOQ4uxi6fQdp_RQKHp-i6Q-m-G1+384_DafF3QzYcUq4guLd6w@mail.gmail.com>

On Sun, 2019-04-28 at 09:45 -0400, Amir Goldstein wrote:
> On Sun, Apr 28, 2019 at 8:09 AM Jeff Layton <jlayton@kernel.org>
> wrote:
> > On Sat, 2019-04-27 at 16:16 -0400, Amir Goldstein wrote:
> > > [adding back samba/nfs and fsdevel]
> > > 
> > 
> > cc'ing Pavel too -- he did a bunch of work in this area a few years
> > ago.
> > 
> > > On Fri, Apr 26, 2019 at 6:22 PM Jeff Layton <jlayton@kernel.org>
> > > wrote:
> > > > On Fri, 2019-04-26 at 10:50 -0400, J. Bruce Fields wrote:
> > > > > On Fri, Apr 26, 2019 at 04:11:00PM +0200, Amir Goldstein
> > > > > wrote:
> > > > > > On Fri, Apr 26, 2019, 4:00 PM J. Bruce Fields <
> > > > > > bfields@fieldses.org> wrote:
> > > > > > 
> > > > That said, we could also look at a vfs-level mount option that
> > > > would
> > > > make the kernel enforce these for any opener. That could also
> > > > be useful,
> > > > and shouldn't be too hard to implement. Maybe even make it a
> > > > vfsmount-
> > > > level option (like -o ro is).
> > > > 
> > > 
> > > Yeh, I am humbly going to leave this struggle to someone else.
> > > Not important enough IMO and completely independent effort to the
> > > advisory atomic open&lock API.
> > 
> > Having the kernel allow setting deny modes on any open call is a
> > non-
> > starter, for the reasons Bruce outlined earlier. This _must_ be
> > restricted in some fashion or we'll be opening up a ginormous DoS
> > mechanism.
> > 
> > My proposal was to make this only be enforced by applications that
> > explicitly opt-in by setting O_SH*/O_EX* flags. It wouldn't be too
> > difficult to also allow them to be enforced on a per-fs basis via
> > mount
> > option or something. Maybe we could expand the meaning of '-o mand'
> > ?
> > 
> > How would you propose that we restrict this?
> > 
> 
> Our communication channel is broken.
> I did not intend to propose any implicit locking.
> If samba and nfsd can opt-in with O_SHARE flags, I do not
> understand why a mount option is helpful for the cause of
> samba/nfsd interop.
> 
> If someone else is interested in samba/local interop than
> yes, a mount option like suggested by Pavel could be a good option,
> but it is an orthogonal effort IMO.

If an NFS client 'opts in' to set share deny, then that still makes it
a non-optional lock for the other NFS clients, because all ordinary
open() calls will be gated by the server whether or not their
application specifies the O_SHARE flag. There is no flag in the NFS
protocol that could tell the server to ignore deny modes.

IOW: it would suffice for 1 client to use O_SHARE|O_DENY* to opt all
the other clients in.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2019-04-28 15:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 11:20 Better interop for NFS/SMB file share mode/reservation Amir Goldstein
2019-02-08 13:10 ` Jeff Layton
2019-02-08 14:45   ` Amir Goldstein
2019-02-08 15:50     ` J. Bruce Fields
2019-02-08 20:02       ` Amir Goldstein
2019-02-08 20:16         ` J. Bruce Fields
2019-02-08 20:31           ` Amir Goldstein
2019-02-14 20:51             ` J. Bruce Fields
2019-02-15  7:31               ` Amir Goldstein
2019-02-15 20:09                 ` J. Bruce Fields
2019-02-08 22:12         ` Jeremy Allison
2019-02-09  4:04           ` Amir Goldstein
2019-02-14 21:06             ` J. Bruce Fields
2019-03-05 21:47               ` J. Bruce Fields
2019-03-06  7:09                 ` Amir Goldstein
2019-03-06 15:17                   ` J. Bruce Fields
2019-03-06 15:37                     ` [NFS-Ganesha-Devel] " Frank Filz
2019-03-08 21:38                       ` 'J. Bruce Fields'
2019-03-08 21:53                         ` Frank Filz
2019-03-06 15:11                 ` J. Bruce Fields
2019-03-06 20:31                   ` Jeff Layton
2019-03-06 21:07                     ` Jeremy Allison
2019-03-06 21:25                       ` Ralph Böhme
2019-03-07 11:03                         ` Stefan Metzmacher
2019-03-07 16:47                           ` Simo
2019-04-25 18:11                           ` Amir Goldstein
2019-03-06 21:55                       ` Jeff Layton
2019-02-08 16:03     ` Jeff Layton
2019-02-08 16:28       ` Jeffrey Layton
     [not found]       ` <CAOQ4uxgQsRaEOxz1aYzP1_1fzRpQbOm2-wuzG=ABAphPB=7Mxg@mail.gmail.com>
     [not found]         ` <20190426140023.GB25827@fieldses.org>
     [not found]           ` <CAOQ4uxhuxoEsoBbvenJ8eLGstPc4AH-msrxDC-tBFRhvDxRSNg@mail.gmail.com>
     [not found]             ` <20190426145006.GD25827@fieldses.org>
     [not found]               ` <e69d149c80187b84833fec369ad8a51247871f26.camel@kernel.org>
2019-04-27 20:16                 ` Amir Goldstein
2019-04-28 12:09                   ` Jeff Layton
2019-04-28 13:45                     ` Amir Goldstein
2019-04-28 15:06                       ` Trond Myklebust [this message]
2019-04-28 22:00                         ` Amir Goldstein
2019-04-28 22:08                           ` Trond Myklebust
2019-04-28 22:33                             ` Amir Goldstein
2019-04-29  0:57                               ` Trond Myklebust
2019-04-29 11:42                                 ` Amir Goldstein
2019-04-29 13:10                                   ` Trond Myklebust
2019-04-29 20:29                                 ` Jeff Layton
2019-04-29 22:33                                   ` Pavel Shilovskiy
2019-04-30  0:31                                     ` Amir Goldstein
2019-04-30  8:12                                       ` Uri Simchoni
2019-04-30  9:22                                         ` Amir Goldstein
2019-02-11  5:31     ` ronnie sahlberg

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=1d5265510116ece75d6eb7af6314e6709e551c6e.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=Volker.Lendecke@sernet.de \
    --cc=amir73il@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pshilov@microsoft.com \
    --cc=samba-technical@lists.samba.org \
    /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).