Re: [PATCH v2 1/3] fs: add infrastructure for multigrain inode i_m/ctime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux