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

Eryu Guan
2015-09-29T10:33:41Z

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