Re: [PATCH v2] fstests: generic: Check if a bull fallocate will change extent number

Qu Wenruo
2015-09-29T10:46:34Z

在 2015年09月29日 18:33, Eryu Guan 写道:
> On Tue, Sep 29, 2015 at 06:16:11PM +0800, Qu Wenruo wrote:
>>
> <snip>
>>>> +
>>>> +if [ "x$orig_extent_nr" != "x$new_extent_nr" ]; then
>>>> + echo "number of extents mis-match after bull fallocate"
>>>
>>> print out the $orig_extent_nr and $new_extent_nr in this failure case? I
>>> think it's useful to see the difference just from the output diff, don't
>>> have to check the full file.
>>
>> The problem is, we can't ensure orig/new_extent_nr always be a constant
>> value(1 for btrfs case).
>
> Sorry, I might be unclear, I mean print the extent number in the error
> path, e.g.
>
> echo "number of extents mis-match after null fallocate"
> echo "old: $orig_extent_nr, new: $new_extent_nr"
>
> not matching the number with golden output.
>
> Thanks,
> Eryu

That sounds pretty nice.
Will change it in next version.

Thanks,
Qu
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>