From: NeilBrown <neilb@suse.de>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: Small O_SYNC writes are no longer NFS_DATA_SYNC
Date: Tue, 22 Mar 2011 10:47:47 +1100 [thread overview]
Message-ID: <20110322104747.2c61dd0d@notabene.brown> (raw)
In-Reply-To: <1300748095.26546.12.camel@lade.trondhjem.org>
On Mon, 21 Mar 2011 18:54:55 -0400 Trond Myklebust
<Trond.Myklebust@netapp.com> wrote:
> On Tue, 2011-03-22 at 09:17 +1100, NeilBrown wrote:
> > On Mon, 21 Mar 2011 17:02:00 -0400 Trond Myklebust
> > <Trond.Myklebust@netapp.com> wrote:
> > I must admit that I found the terminology a bit confusing for
> > FLUSH_COND_STABLE.
> > What is means is "if this turns out to be part of a larger request, then clear
> > FLUSH_STABLE" - which sounds a bit more like "FLUSH_COND_UNSTABLE" - i.e. if
> > a condition is met, then make it unstable.
> > But I don't think that change would help at all.
> >
> > How about changing the test in nfs_write_rpcsetup to
> > if (how & (FLUSH_STABLE|FLUSH_CONDSTABLE)) {
> > data->args.stable = NFS_DATA_SYNC;
> > if (!nfs_need_commit(NFS_I(inode)))
> > data->args.stable = NFS_FILE_SYNC;
> > }
> >
> > and then just set either FLUSH_STABLE or FLUSH_COND_STABLE - never both -
> > and when you test FLUSH_COND_STABLE and then some other condition, just
> > clear FLUSH_COND_STABLE.
> >
> > I would find that quite a bit more readable.
>
> The reason why I opted not to go for that approach was because
> nfs_write_rpcsetup() doesn't really know about whether or not there are
> any more RPCs pending (and so having a 'conditional' flag being
> interpreted there didn't appear to make sense), but if you feel that is
> easier on the eyes then I'm happy to change my opinion.
>
I do see your point - by the time we get to nfs_write_rpcsetup it isn't
really conditional any more - it is now mandatory.
Maybe one cannot get the names perfect. However I find that having
interdependencies between different flag bits can easily become confusing.
So I have a slight preference for my version, but I concede that it isn't a
clear winner.
Thanks,
NeilBrown
prev parent reply other threads:[~2011-03-21 23:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 6:15 Small O_SYNC writes are no longer NFS_DATA_SYNC NeilBrown
2011-02-16 13:11 ` Jeff Layton
2011-02-16 20:26 ` NeilBrown
2011-02-16 20:50 ` Jeff Layton
2011-02-16 21:00 ` NeilBrown
2011-03-17 23:53 ` Trond Myklebust
2011-03-18 1:04 ` NeilBrown
2011-03-18 1:49 ` Trond Myklebust
2011-03-18 2:12 ` NeilBrown
2011-03-18 2:25 ` Trond Myklebust
2011-03-18 3:52 ` NeilBrown
2011-03-21 21:02 ` Trond Myklebust
2011-03-21 22:17 ` NeilBrown
2011-03-21 22:54 ` Trond Myklebust
2011-03-21 23:47 ` NeilBrown [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=20110322104747.2c61dd0d@notabene.brown \
--to=neilb@suse.de \
--cc=Trond.Myklebust@netapp.com \
--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).