[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <168237601955.24821.11999779095797667429@noble.neil.brown.name>
Date: Tue, 25 Apr 2023 08:40:19 +1000
From: "NeilBrown" <neilb@...e.de>
To: "Jeff Layton" <jlayton@...nel.org>
Cc: "Alexander Viro" <viro@...iv.linux.org.uk>,
"Christian Brauner" <brauner@...nel.org>,
"Darrick J. Wong" <djwong@...nel.org>,
"Hugh Dickins" <hughd@...gle.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Dave Chinner" <david@...morbit.com>,
"Chuck Lever" <chuck.lever@...cle.com>, "Jan Kara" <jack@...e.cz>,
"Amir Goldstein" <amir73il@...il.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-mm@...ck.org,
linux-nfs@...r.kernel.org
Subject: Re: [PATCH v2 1/3] fs: add infrastructure for multigrain inode i_m/ctime
On Tue, 25 Apr 2023, Jeff Layton wrote:
> On Tue, 2023-04-25 at 07:47 +1000, NeilBrown wrote:
> > On Tue, 25 Apr 2023, Jeff Layton wrote:
> > > + /*
> > > + * Warn if someone sets SB_MULTIGRAIN_TS, but doesn't turn down the ts
> > > + * granularity.
> > > + */
> > > + return (sb->s_flags & SB_MULTIGRAIN_TS) &&
> > > + !WARN_ON_ONCE(sb->s_time_gran == 1);
> >
> > Maybe
> > !WARN_ON_ONCE(sb->s_time_gran & SB_MULTIGRAIN_TS);
> > ??
> >
>
> I'm not sure I understand what you mean here.
That's fair, as what I wrote didn't make any sense.
I meant to write:
!WARN_ON_ONCE(sb->s_time_gran & I_CTIME_QUERIED);
to make it explicit that s_time_gran must leave space for
I_CTIME_QUERIED to be set (as you write below). Specifically that
s_time_gran mustn't be odd.
> We want to check whether
> SB_MULTIGRAIN_TS is set in the flags, and that s_time_gran > 1. The
> latter is required so that we have space for the I_CTIME_QUERIED flag.
>
> If SB_MULTIGRAIN_TS is set, but the s_time_gran is too low, we want to
> throw a warning (since something is clearly wrong).
>
NeilBrown
Powered by blists - more mailing lists