xfs_repair doesn't fix sb versionnum missing attr

C Linus Hicks linush at verizon.net
Fri Feb 12 15:51:06 CST 2010


On Fri, 2010-02-12 at 15:29 -0600, Eric Sandeen wrote:
> C Linus Hicks wrote:
> > On Fri, 2010-02-12 at 14:29 -0600, Eric Sandeen wrote:
> >> C Linus Hicks wrote:
> >>> I run:
> >>>
> >>> xfs_check /dev/sdc10
> >>>
> >>> And it reports:
> >>>
> >>> sb versionnum missing attr bit 10
> >>>
> >>> Then I run:
> >>>
> >>> xfs_repair /dev/sdc10
> >>>
> >>> And it reports output from 7 phases and "done".
> >>>
> >>> Again I run:
> >>>
> >>> xfs_check /dev/sdc10
> >>>
> >>> And it reports:
> >>>
> >>> sb versionnum missing attr bit 10
> >>>
> >>> Is this how it's supposed to work?
> >>> Thanks for any help.
> >>> Linus
> >>>
> >> I've never seen that before.
> >>
> >> This might be interesting to see:
> >>
> >> # xfs_db /dev/sdc10
> >> xfs_db> sb 0
> >> xfs_db> version
> >>
> >> If you want to send me a zipped-up, obfuscated metadump of the filesystem
> >> I could take a quick look.
> >>
> >> -Eric
> > 
> > The output from the "version" command:
> > 
> > versionnum [0x3084+0x0] = V4,ALIGN,DIRV2,EXTFLG
> > 
> > I'll email the metadump directly to you so as not to pollute the list.
> 
> Ok so a little less mystery here; I was concerned about how we got here,
> but Linus had to manually reconstruct his superblock, hence the missing
> flags.
> 
> Looks like there are selinux attributes on all the files, so of course
> the sb should have the attr flags set.
> 
> This does look like one test that check has and repair doesn't.
> 
> <checking upstream for sure>
> 
> yep!
> 
> Linus, FWIW simply creating a new file on the fs with xattrs (any
> old file works if selinux is on) will set the flags as if it were
> the first file created w/ an attr...
> 
> [root at host Linus-repair-bug]# xfs_check sdc10-md.log.img 
> sb versionnum missing attr bit 10
> [root at host Linus-repair-bug]# mount -o loop sdc10-md.log.img mnt/
> [root at host Linus-repair-bug]# echo foobar > mnt/blah
> [root at host Linus-repair-bug]# ls -Z mnt/blah
> -rw-r--r--  root root root:object_r:file_t             mnt/blah
> [root at host Linus-repair-bug]# umount mnt
> [root at host Linus-repair-bug]# xfs_check sdc10-md.log.img 
> [root at host Linus-repair-bug]#
> 
> I suppose that check should get added to repair though.
> 
> Care to file a bug so it doesn't get lost?
> 
> -Eric

Sure, I can do that.
Linus





More information about the xfs mailing list