All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "neilb@suse.de" <neilb@suse.de>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
	"plambri@redhat.com" <plambri@redhat.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"bcodding@redhat.com" <bcodding@redhat.com>
Subject: Re: cto changes for v4 atomic open
Date: Mon, 9 Aug 2021 14:22:42 +0000	[thread overview]
Message-ID: <960504100073731731f249c74ac59d933324408d.camel@hammerspace.com> (raw)
In-Reply-To: <162848282650.22632.1924568027690604292@noble.neil.brown.name>

On Mon, 2021-08-09 at 14:20 +1000, NeilBrown wrote:
> On Wed, 04 Aug 2021, Trond Myklebust wrote:
> > On Wed, 2021-08-04 at 11:30 +1000, NeilBrown wrote:
> > 
> > Caching not a "best effort" attempt. The client is expected to
> > provide
> > a perfect reproduction of the data stored on the server in the case
> > where there is no close-to-open violation.
> > In the case where there are close-to-open violations then there are
> > two
> > cases:
> > 
> >    1. The user cares, and is using uncached I/O together with a
> >       synchronisation protocol in order to mitigate any
> > data+metadata
> >       discrepancies between the client and server.
> >    2. The user doesn't care, and we're in the standard buffered I/O
> >       case.
> > 
> > 
> > Why are you and Bruce insisting that case (2) needs to be treated
> > as
> > special?
> 
> I don't see these as the relevant cases.  They seem to assume that
> "the
> user" is a single entity with a coherent opinion.  I don't think that
> is
> necessarily the case.
> 
> I think it best to focus on the behaviours, and intentions behind,
> individual applications.  You said previously that NFS doesn't
> provide
> caches for applications, only for whole clients.  This is obviously
> true
> but I think it misses an important point.  While the cache belongs to
> the whole client, the "open" and "close" are performed by individual
> applications.  close-to-open addresses what happens between a CLOSE
> and
> an OPEN.
> 
> While it may be reasonable to accept that any application must depend
> on
> correctness of any other application with write access to the file,
> it
> doesn't necessary follow that any application can only be correct
> when
> all applications with read access are well behaved.
> 
> If an application arranges, through some external means, to only open
> a
> file after all possible writing application have closed it, then the
> NFS
> caching should not get in the way for the application being able to
> read
> anything that the other application(s) wrote.  This, it me, is the
> core
> of close-to-open consistency.
> 
> Another application writing concurrently may, of course, affect the
> read
> results in an unpredictable way.  However another application READING
> concurrently should not affect an application which is carefully
> serialised with any writers.
> 

That's a discussion we can have after Bruce and Chuck implement read
and write delegations that are always handed out when possible. Until
that's the case, there will be no changes made to the close-to-open
behaviour on the Linux NFSv4 client.

As for NFSv3, I don't see the above suggestion ever being implemented
in the Linux client because at this point, people deliberately choosing
NFSv3 are doing so almost exclusively for performance reasons.

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



  reply	other threads:[~2021-08-09 14:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 13:25 cto changes for v4 atomic open Benjamin Coddington
2021-07-30 14:48 ` Trond Myklebust
2021-07-30 15:14   ` Benjamin Coddington
2021-08-03 20:30   ` J. Bruce Fields
2021-08-03 21:07     ` Trond Myklebust
2021-08-03 21:36       ` bfields
2021-08-03 21:43         ` Trond Myklebust
2021-08-03 23:47           ` NeilBrown
2021-08-04  0:00             ` Trond Myklebust
2021-08-04  0:04               ` Trond Myklebust
2021-08-04  0:57               ` NeilBrown
2021-08-04  1:03                 ` Trond Myklebust
2021-08-04  1:16                   ` bfields
2021-08-04  1:25                     ` Trond Myklebust
2021-08-04  1:30                   ` NeilBrown
2021-08-04  1:38                     ` Trond Myklebust
2021-08-09  4:20                       ` NeilBrown
2021-08-09 14:22                         ` Trond Myklebust [this message]
2021-08-09 14:43                           ` Chuck Lever III
2021-08-04  1:43         ` Matt Benjamin
2021-08-04  1:51           ` Matt Benjamin
2021-08-04  2:10             ` Trond Myklebust
2021-08-04 14:49               ` Patrick Goetz
2021-08-04 15:42                 ` Rick Macklem
2021-08-04 18:24                 ` Anna Schumaker
2021-08-06 18:58                   ` Patrick Goetz
2021-08-07  1:03                     ` Rick Macklem
2021-08-04 18:33               ` Matt Benjamin

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=960504100073731731f249c74ac59d933324408d.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=bcodding@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=plambri@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.