Re: [PATCH] xfstests XFS: verify extended attributes after multi-stream xfsdump/xfsrestore

Eric Sandeen
2013-10-07T21:00:09Z

On 10/7/13 3:54 PM, Rich Johnston wrote:
>
>
> On 10/07/2013 03:32 PM, Eric Sandeen wrote:
>> On 10/7/13 2:38 PM, rjohnston@sgi.com wrote:
>>> Verify extended attributes are not lost after multi-stream
>>> xfsdump/xfsrestore of wholly-sparse files. xfsrestore did not
>>> recognize that if the LAST header was reached with no restoredsz set,
>>> (i.e the LAST header is the only header), the following warning is
>>> displayed:
>>>
>>> "partial_reg: Out of records. Extend attrs applied early."
>>>
>>> and the extended attributes on the current and following restored
>>> files are lost.
>>
>> and restore segfaults too, IIRC. ;)
>
> For test 2 yes you are correct, does not segfault for test 1.

Ah, I had missed that. Makes sense now.

>>
>> So I'm trying to understand - are attrs not applied because xfs_restore
>> terminates, or is everything fine other than the attrs missing when
>> it completes successfully?
>
> Everything fine other than the attrs missing when it completes successfully, which is how this bug was originally reported to me.
> In DMF land this meant OFFLINE files were restored as NON-MIGRATABLE (iow Extended attributes removed )
>
>>
>> iows, I get this when it fails:
>>
>> QA output created by 350
>> Silence is golden.
>> +ATTR for /mnt/scratch/restore/dumpsrc/sparse0 DOES NOT match
>
> This is from the first test, and I purposely just echo the error so I hit the second case too.
>>
>> and never get to the point of seeing if attrs are missing.
>
> Forgot I changed the echo "restore failed" to _fail "restore failed".
> That's why you don't see the attrs are missing.

ok.

>>
>> Anyway, a few other things below for the record...
>>
>>> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>>>
>>> ---
>>> tests/xfs/350 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> tests/xfs/350.out | 2
>>> tests/xfs/group | 1
>>> 3 files changed, 137 insertions(+)
>>>
>>> Index: b/tests/xfs/350
>>> ===================================================================
>>> --- /dev/null
>>> +++ b/tests/xfs/350
>>> @@ -0,0 +1,134 @@
>>> +#! /bin/bash
>>> +# FS QA Test No. 350
>>
>> Big jump!
>
> Taken care of at commit time. ;) Big jump as to not interfere with other peoples development.

fine by me!

...

>> Just out of curiosity, is the root (-R) namespace relevant to the problem?
>
> Don't think so I can remove th -R.

doesn't really matter to me except then you'd need _require_root if you want
to use -R.

-Eric