xfs
[Top] [All Lists]

Re: [RFC, PATCH] xfs: make superblock version checks reflect reality

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [RFC, PATCH] xfs: make superblock version checks reflect reality
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sun, 9 Mar 2014 11:32:54 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140307101527.GC32333@xxxxxxxxxxxxx>
References: <1394088890-10713-1-git-send-email-david@xxxxxxxxxxxxx> <20140306180534.GA305@xxxxxxxxxxxxx> <20140306225541.GL6851@dastard> <20140307101527.GC32333@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Mar 07, 2014 at 02:15:27AM -0800, Christoph Hellwig wrote:
> On Fri, Mar 07, 2014 at 09:55:41AM +1100, Dave Chinner wrote:
> > > I'd vote to kill XFS_SB_NEEDED_FEATURES and just check the dirv2 bit
> > > explicitly.
> > 
> > Ok. The only real reason I did this was in case there's a single bit
> > error that clears the dirv2 bit, but it still contains other bits
> > that indicate that the superblock is recent enough that we
> > understand it's contents and what should bein the fs.  e.g. for
> > db/repair purposes - if the dir2 bit is not set, but any of the
> > above bits are set and the m_dirblklog is and it is sane, we can
> > assume that we've lost the feature bit and repair it.
> 
> Seems like we should just special case that in repair instead of
> allowing a filesystem to go through in the kernel that is guaranteed to
> be corrupted.

Ok, that makes a lot of sense. I'll change it to do that.

> > Should I just drop it out of the supported feature matrix and drop
> > all other checks on that field? That way we can then remove all the
> > the crap that tries to validate it from xfs_repair, too. I have no
> > idea what is actually valid for this field, so I think we should
> > simply drop support of it from everything.
> 
> I think we should pretending we know anything about the shared mount
> support.  Everytime it came up I failed to find any hint on how it was
> supposed to work.

*nod*. I'll drop the shared bit from the supported matrix, and also
treat sb_shared_vn != 0 a corruption.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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