xfs
[Top] [All Lists]

Re: [PATCH 8/9] xfs: add fsgeom flag for v5 superblock support.

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH 8/9] xfs: add fsgeom flag for v5 superblock support.
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 30 May 2013 11:28:25 +1000
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130529214301.GB20028@xxxxxxx>
References: <1369636707-15150-1-git-send-email-david@xxxxxxxxxxxxx> <1369636707-15150-9-git-send-email-david@xxxxxxxxxxxxx> <51A61A55.1000306@xxxxxxxxxxx> <20130529214301.GB20028@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, May 29, 2013 at 04:43:01PM -0500, Ben Myers wrote:
> Hi Eric,
> 
> On Wed, May 29, 2013 at 10:10:13AM -0500, Eric Sandeen wrote:
> > On 5/27/13 1:38 AM, Dave Chinner wrote:
> > > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > > 
> > > Currently userspace has no way of determining that a filesystem is
> > > CRC enabled. Add a flag to the XFS_IOC_FSGEOMETRY ioctl output to
> > > indicate that the filesystem has v5 superblock support enabled.
> > > This will allow xfs_info to correctly report the state of the
> > > filesystem.
> > 
> > 
> > Looks fine,
> > 
> > Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> > 
> > Ben, having this in place for for the next point release will let
> > userspace work & testing proceed w/o the need for a patched
> > kernel... if you could consider pulling it in that'd be great.
> 
> Sounds reasonable.  I'll check it out.
> 
> > Dave, just out of curiosity, most other features sort of match between
> > the "_has_*" and the flag names, is there a reason for the
> > crc <-> sbv5 difference?  Just semantics, but just curious.
> > 
> > (i.e. xfs_sb_version_hasprojid32bit checks XFS_SB_VERSION2_PROJID32BIT,
> > but xfs_sb_version_hascrc checks XFS_SB_VERSION_5)
> > 
> > Answering my own question maybe, I guess SB_VERSION_5 was conceived
> > with crc already in place, so there's no need for a feature flag on
> > top of the sb version, right...?
> 
> Seems like we're also out of space in xfs_fsop_geom.flags. 

Nowhere near it, actually ;). flags is a __u32, this is only the
16th flag.

> There may even be
> people who prefer to use v5 super blocks without crcs turned on, so maybe
> conflating the two ideas here is undesireable.

The flag is indicating that there is a different format on disk, not
that crcs are enabled or not. Userspace needs to know about that
different format, and right now *userspace* assumes v5 superblocks
mean CRCs are enabled because that's part of the definition of the
features that a v5 superblock has.

If in future that changes (hint: it won't) then we can add a
separate flag to indicate whether CRCs are enabled or not when the
feature flag to disable them is added to the superblock.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>