linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Siebenmann <cks@cs.toronto.edu>
To: linux-nfs@vger.kernel.org
Cc: cks@cs.toronto.edu
Subject: Correctly understanding Linux's close-to-open consistency
Date: Wed, 12 Sep 2018 21:24:58 -0400	[thread overview]
Message-ID: <20180913012458.A6651322562@apps1.cs.toronto.edu> (raw)

 I'm trying to get my head around the officially proper way of
writing to NFS files (not just what works today, and what I think
is supposed to work, since I was misunderstanding things about that
recently).

 Is it correct to say that when writing data to NFS files, the only
sequence of operations that Linux NFS clients officially support is
the following:

- all processes on all client machines close() the file
- one machine (a client or the fileserver) opens() the file, writes
  to it, and close()s again
- processes on client machines can now open() the file again for
  reading

Other sequences of operations may work in some particular kernel version
or under some circumstances, but are not guaranteed to work over kernel
version changes or in general.

In an official 'we guarantee that if you do this, things will work' sense,
how does taking NFS locks interact with this required sequence? Do NFS
locks make some part of it unnecessary, or does it remain necessary and
NFS locks are just there to let you coordinate who has a magic 'you can
write' token and you still officially need to close and open and so on?

Thanks in advance.

	- cks

             reply	other threads:[~2018-09-13  6:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13  1:24 Chris Siebenmann [this message]
2018-09-15 16:20 ` Correctly understanding Linux's close-to-open consistency Jeff Layton
2018-09-15 19:11   ` Chris Siebenmann
2018-09-16 11:01     ` Jeff Layton
2018-09-16 16:12       ` Trond Myklebust
2018-09-17  0:18         ` Chris Siebenmann
2018-09-17  2:19           ` Trond Myklebust

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=20180913012458.A6651322562@apps1.cs.toronto.edu \
    --to=cks@cs.toronto.edu \
    --cc=linux-nfs@vger.kernel.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).