Re: [PATCH] Rearrange i_flags to be consistent with FS_IOC_GETFLAGS

Dave Chinner
2010-07-06T23:03:19Z

On Tue, Jul 06, 2010 at 02:40:23PM +0100, David Howells wrote:
> Dave Chinner <david@fromorbit.com> wrote:
>
> > Further, it opens up the possibility that further down the track
> > someone modifies S_* flag values (say when adding some XFS
> > functionality) and corrupts extN filesystems all over the place.
> > There isn't even compiler guards to catch someone modifying the S_*
> > flags in a way that makes it incompatible with the extN on-disk
> > definitions.
>
> That occurred to me after I sent the patch. I can add some preprocessor guards
> for this.

I'd prefer generic flags are not dependent on fixed values from a
specific filesystem several layers down the storage stack.

Also, if the problem you are trying to solve is overhead of
calculating the flags for stat() on RISC architectures, then I'd
argue that XFS is just as important target for such an optimisation
because it is widely used in small ARM and MIPS based NAS
appliances....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com