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@xxxxxxxxxx>