xfs
[Top] [All Lists]

Re: [PATCH] xfstests: btrfs, test send's ability to punch holes and prea

To: Filipe David Borba Manana <fdmanana@xxxxxxxxx>
Subject: Re: [PATCH] xfstests: btrfs, test send's ability to punch holes and prealloc extents
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 16 Apr 2014 10:23:49 +1000
Cc: xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, jbacik@xxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1397580201-27475-1-git-send-email-fdmanana@xxxxxxxxx>
References: <1397580201-27475-1-git-send-email-fdmanana@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Apr 15, 2014 at 05:43:21PM +0100, Filipe David Borba Manana wrote:
> This test verifies that after an incremental btrfs send the replicated file 
> has
> the same exact hole and data structure as in the origin filesystem. This 
> didn't
> use to be the case before the send stream version 2 - holes were sent as write
> operations of 0 valued bytes instead of punching holes with the fallocate 
> system
> call, and pre-allocated extents were sent as well as write operations of 0 
> valued
> bytes instead of intructions for the receiver to use the fallocate system 
> call.
> Also checks that prealloc extents that lie beyond the file's size are 
> replicated
> by an incremental send.

Can you wrap commit messages at 68 columns?

....
> +md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
> +# List all hole and data segments.
> +$XFS_IO_PROG -r -c "seek -r -a 0" $SCRATCH_MNT/mysnap2/foo
> +# List all extents, we're interested here in prealloc extents that lie beyond
> +# the file's size.
> +$XFS_IO_PROG -r -c "fiemap -l" $SCRATCH_MNT/mysnap2/foo | _filter_scratch

That dumps raw block numbers into the golden output. _filter_fiemap
is probably needed here.

> +md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
> +# List all hole and data segments.
> +$XFS_IO_PROG -r -c "seek -r -a 0" $SCRATCH_MNT/mysnap2/foo
> +# List all extents, we're interested here in prealloc extents that lie beyond
> +# the file's size.
> +$XFS_IO_PROG -r -c "fiemap -l" $SCRATCH_MNT/mysnap2/foo | _filter_scratch

Same here.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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