linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dave Chinner <david@fromorbit.com>,
	Chuck Lever <chuck.lever@oracle.com>, Jan Kara <jack@suse.cz>,
	Amir Goldstein <amir73il@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-mm@kvack.org,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] fs: add infrastructure for multigrain inode i_m/ctime
Date: Tue, 25 Apr 2023 13:45:19 -0400	[thread overview]
Message-ID: <aa60b0fa23c1d582cfad0da5b771d427d00c4316.camel@kernel.org> (raw)
In-Reply-To: <168237601955.24821.11999779095797667429@noble.neil.brown.name>

On Tue, 2023-04-25 at 08:40 +1000, NeilBrown wrote:
> 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. 
>   

Erm...it may be an unpopular opinion, but I find that more confusing
than just ensuring that the s_time_gran > 1. I keep wondering if we
might want to carve out other low-order bits too for some later purpose,
at which point trying to check this using flags wouldn't work right. I
think I might just stick with what I have here, at least for now.

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-04-25 17:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 15:11 [PATCH v2 0/3] fs: multigrain timestamps Jeff Layton
2023-04-24 15:11 ` [PATCH v2 1/3] fs: add infrastructure for multigrain inode i_m/ctime Jeff Layton
2023-04-24 21:47   ` NeilBrown
2023-04-24 22:30     ` Jeff Layton
2023-04-24 22:40       ` NeilBrown
2023-04-25 17:45         ` Jeff Layton [this message]
2023-04-25 17:56           ` Matthew Wilcox
2023-04-25 19:12             ` Jeff Layton
2023-04-26  6:41       ` Christian Brauner
2023-04-26  6:53   ` Christian Brauner
2023-04-26  9:46     ` Jeff Layton
2023-04-27  9:44       ` Christian Brauner
2023-04-26  7:07   ` Christian Brauner
2023-04-26  9:48     ` Jeff Layton
2023-04-27  9:51       ` Christian Brauner
2023-04-27  9:57         ` Jeff Layton
2023-04-24 15:11 ` [PATCH v2 2/3] shmem: mark for high-res timestamps on next update after getattr Jeff Layton
2023-04-24 15:11 ` [PATCH v2 3/3] xfs: mark the inode for high-res timestamp update in getattr Jeff Layton

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=aa60b0fa23c1d582cfad0da5b771d427d00c4316.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /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).