xfs
[Top] [All Lists]

Re: xfs_repair doesn't fix sb versionnum missing attr

To: C Linus Hicks <linush@xxxxxxxxxxx>
Subject: Re: xfs_repair doesn't fix sb versionnum missing attr
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 12 Feb 2010 15:29:37 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1266007649.7755.12.camel@xxxxxxxxxxxxxxx>
References: <1265996674.7755.7.camel@xxxxxxxxxxxxxxx> <4B75BA12.1060704@xxxxxxxxxxx> <1266007649.7755.12.camel@xxxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
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@host Linus-repair-bug]# xfs_check sdc10-md.log.img 
sb versionnum missing attr bit 10
[root@host Linus-repair-bug]# mount -o loop sdc10-md.log.img mnt/
[root@host Linus-repair-bug]# echo foobar > mnt/blah
[root@host Linus-repair-bug]# ls -Z mnt/blah
-rw-r--r--  root root root:object_r:file_t             mnt/blah
[root@host Linus-repair-bug]# umount mnt
[root@host Linus-repair-bug]# xfs_check sdc10-md.log.img 
[root@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

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