From: Trond Myklebust <trondmy@hammerspace.com>
To: "bcodding@redhat.com" <bcodding@redhat.com>,
"martin.l.wege@gmail.com" <martin.l.wege@gmail.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Does NFSv4 close-to-open consistency work with server "async" mount open?
Date: Thu, 16 Nov 2023 19:39:22 +0000 [thread overview]
Message-ID: <be43b1cc2a66c8377fe97b99f14acaf5e19bfa66.camel@hammerspace.com> (raw)
In-Reply-To: <08A8C65F-5755-41DC-B29A-DE168B23C968@redhat.com>
On Thu, 2023-11-16 at 07:30 -0500, Benjamin Coddington wrote:
> On 16 Nov 2023, at 2:11, Martin Wege wrote:
>
> > Hello,
> >
> > Does NFSv4 close-to-open consistency on the client work with server
> > "async" mount open?
>
> Yes, I believe it should, but I am looking at knfsd code and I think
> it
> won't.
>
> > We see several build errors here with parallel GNU Makefile update,
> > where one process writes a file, exists, and the next process
> > doesn't
> > see all data (linker ar: file too short).
> > But if you manually look at it the files are OK, and completely
> > written.
If the process doing the checking is running on the same one that wrote
the file, then we should be able to emulate full POSIX semantics, and
your problem is not NFS related.
If the two processes are running on different clients, then the caching
issues come into play. If that is the case, then is the linker opening
the file, or is it just using stat()? If the latter, then it is not
relying on close-to-open cache consistency, but just standard attribute
caching (i.e. polling).
> >
> > What is this? NFSv4 client bug, NFSv4 server bug, admin error
> > (async
> > breaking close-to-open consistency?
>
> Hard to say, a wire capture would show. My guess is that the
> server's
> "async" disables the write gather in nfsd_vfs_write().
The "async" flag in /etc/exports disables COMMIT and metadata commits.
IOW: it is a data persistence threat, but does not change any caching
semantics.
> > Also, is close-to-open consistency guaranteed between different
> > NFSv4 clients?
>
> Yes.
>
> Ben
>
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
prev parent reply other threads:[~2023-11-16 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 7:11 Does NFSv4 close-to-open consistency work with server "async" mount open? Martin Wege
2023-11-16 12:30 ` Benjamin Coddington
2023-11-16 19:08 ` Martin Wege
2023-11-16 19:39 ` Trond Myklebust [this message]
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=be43b1cc2a66c8377fe97b99f14acaf5e19bfa66.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=martin.l.wege@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