From: Jeff Layton <jlayton@kernel.org>
To: "J. Bruce Fields" <bfields@fieldses.org>,
"suy.fnst@fujitsu.com" <suy.fnst@fujitsu.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"trond.myklebust@hammerspace.com"
<trond.myklebust@hammerspace.com>,
"bfields@redhat.com" <bfields@redhat.com>
Subject: Re: [bug report] nfs clients fail to get read delegations after file open with O_RDWR
Date: Tue, 14 Dec 2021 12:19:54 -0500 [thread overview]
Message-ID: <03f509d6889856869058e1bfb4d480524489354b.camel@kernel.org> (raw)
In-Reply-To: <20211214164507.GC12078@fieldses.org>
On Tue, 2021-12-14 at 11:45 -0500, J. Bruce Fields wrote:
> On Tue, Dec 14, 2021 at 12:50:53AM +0000, suy.fnst@fujitsu.com wrote:
> > Thanks for your quick reply!
> >
> > > > Without looking at this case in detail:
> >
> > > > Delegations are granted at the server's discretion, so this certainly
> > > > isn't a bug.
> >
> > Got it.
> >
> > > > It might be suboptimal behavior. If there's evidence that this causes
> > > > significant regressions on some important workload, then we'd want to
> > > > look into fixing it.
> >
> > If I understand the case correctly, the most common workload it influences like:
> >
> > One nfs client opens a file with flag O_WRONLY/O_RDWR, close it.
> > Then some nfs clients open the file with O_RDONLY right now then it will prevent
> > server to give any delegation to other clients. It may cause many unnecessary
> > requests from clients because lack of delegations.
>
> Right.
>
> For the moment, this is something I'd accept patches for, but I'm not
> actively working on.
>
> I think it's been suggested that we could even turn off the file cache
> completely in the v4 case, since in that case we don't have to re-open
> on every IO.
>
Is that really desirable behavior? There is the bloom filter in
nfs4state.c too that prevents it from handing out a delegation too soon
after a delegrecall.
The situation above doesn't involve a recall, but it _could_ have if the
timing had been a little different. It's probably worth thinking about
how the rules for this ought to work in all cases.
Should we be treating inodes that experience real delegation recalls
differently from this case?
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2021-12-14 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 3:39 [bug report] nfs clients fail to get read delegations after file open with O_RDWR suy.fnst
2021-12-13 21:55 ` J. Bruce Fields
2021-12-14 0:50 ` suy.fnst
2021-12-14 16:45 ` J. Bruce Fields
2021-12-14 17:19 ` Jeff Layton [this message]
2021-12-14 17:24 ` J. Bruce Fields
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=03f509d6889856869058e1bfb4d480524489354b.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=suy.fnst@fujitsu.com \
--cc=trond.myklebust@hammerspace.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