mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs: punch holes and prealloc extents with send
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. It also checks that prealloc extents that lie beyond the file's size are replicated by an incremental send. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
cd444c6591
commit
f81be18fa8
@@ -2262,6 +2262,15 @@ _run_btrfs_util_prog()
|
||||
run_check $BTRFS_UTIL_PROG $*
|
||||
}
|
||||
|
||||
_require_btrfs_send_stream_version()
|
||||
{
|
||||
$BTRFS_UTIL_PROG send 2>&1 | \
|
||||
grep '^[ \t]*\-\-stream\-version <version>' > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
_notrun "Missing btrfs-progs send --stream-version command line option, skipped this test"
|
||||
fi
|
||||
}
|
||||
|
||||
init_rc()
|
||||
{
|
||||
if [ "$iam" == new ]
|
||||
|
||||
Reference in New Issue
Block a user