@@ -77,9 +77,9 @@ $BTRFS_UTIL_PROG subvolume snapshot -r $work_dir $work_dir/snapshots/backup2 \
>> $seqres.full 2>&1 || _fail "failed backup2"
$BTRFS_UTIL_PROG subvolume snapshot -r $work_dir $work_dir/snapshots/backup3 \
>> $seqres.full 2>&1 || _fail "failed backup3"
-$BTRFS_UTIL_PROG send $work_dir/snapshots/backup3/ -f $TEST_DIR/$tmp_dir/blah \
+$BTRFS_UTIL_PROG send -f $TEST_DIR/$tmp_dir/blah $work_dir/snapshots/backup3 \
>> $seqres.full 2>&1 || _fail "send failed"
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -vvvv -f $TEST_DIR/$tmp_dir/blah \
+$BTRFS_UTIL_PROG receive -vvvv -f $TEST_DIR/$tmp_dir/blah $SCRATCH_MNT \
>> $seqres.full 2>&1 || _fail "receive failed"
echo "Silence is golden"
@@ -79,10 +79,11 @@ $FSSUM_PROG -A -f -w $tmp/fssum.snap $TEST_DIR/$tmp_dir/snap >> $seqres.full \
$FSSUM_PROG -A -f -w $tmp/fssum.snap1 $TEST_DIR/$tmp_dir/snap1 >> $seqres.full \
2>&1 || _fail "fssum gen failed"
-$BTRFS_UTIL_PROG send $TEST_DIR/$tmp_dir/snap -f $tmp/send.snap >> \
+$BTRFS_UTIL_PROG send -f $tmp/send.snap $TEST_DIR/$tmp_dir/snap >> \
$seqres.full 2>&1 || _fail "failed send"
-$BTRFS_UTIL_PROG send $TEST_DIR/$tmp_dir/snap1 -p $TEST_DIR/$tmp_dir/snap \
- -f $tmp/send.snap1 >> $seqres.full 2>&1 || _fail "failed send"
+$BTRFS_UTIL_PROG send -p $TEST_DIR/$tmp_dir/snap \
+ -f $tmp/send.snap1 $TEST_DIR/$tmp_dir/snap1 \
+ >> $seqres.full 2>&1 || _fail "failed send"
$BTRFS_UTIL_PROG receive -f $tmp/send.snap $SCRATCH_MNT >> $seqres.full 2>&1 \
|| _fail "failed recv"
@@ -96,7 +96,7 @@ $BTRFS_UTIL_PROG subvolume snapshot -r $TEST_DIR/$tmp_dir/send \
$TEST_DIR/$tmp_dir/snap2 >> $seqres.full 2>&1 || _fail "failed snap2"
$BTRFS_UTIL_PROG send -f $TEST_DIR/$tmp_dir/send2.dump \
- $TEST_DIR/$tmp_dir/snap2 -p $TEST_DIR/$tmp_dir/snap1 \
+ -p $TEST_DIR/$tmp_dir/snap1 $TEST_DIR/$tmp_dir/snap2 \
>> $seqres.full 2>&1 || _fail "failed second send"
$BTRFS_UTIL_PROG receive -f $TEST_DIR/$tmp_dir/send2.dump $SCRATCH_MNT \
@@ -71,9 +71,9 @@ _run_btrfs_util_prog filesystem sync $SCRATCH_MNT
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap 2>&1
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2 2>&1
md5sum $SCRATCH_MNT/foo | _filter_scratch
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
@@ -84,10 +84,10 @@ _check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
_scratch_unmount
@@ -165,16 +165,16 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -f $tmp/2.snap -p $SCRATCH_MNT/mysnap1 \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full
_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
@@ -72,9 +72,9 @@ $XFS_IO_PROG -c "truncate 3882008" $SCRATCH_MNT/foo
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -f $tmp/2.snap -p $SCRATCH_MNT/mysnap1 \
+ $SCRATCH_MNT/mysnap2
md5sum $SCRATCH_MNT/foo | _filter_scratch
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
@@ -85,10 +85,10 @@ _check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
_scratch_unmount
@@ -80,6 +80,6 @@ $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
do_snapshots &
snapshots_pid=$!
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/snap_1 -f /dev/null 2>&1 | _filter_scratch
+$BTRFS_UTIL_PROG send -f /dev/null $SCRATCH_MNT/snap_1 2>&1 | _filter_scratch
status=0 ; exit
@@ -88,10 +88,10 @@ run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
run_check $FSSUM_PROG -A -f -w $tmp/clones.fssum $SCRATCH_MNT/clones_snap \
-x $SCRATCH_MNT/clones_snap/mysnap1 -x $SCRATCH_MNT/clones_snap/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send $SCRATCH_MNT/clones_snap -f $tmp/clones.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -f $tmp/clones.snap $SCRATCH_MNT/clones_snap
_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 \
- -c $SCRATCH_MNT/clones_snap $SCRATCH_MNT/mysnap2 -f $tmp/2.snap
+ -c $SCRATCH_MNT/clones_snap -f $tmp/2.snap $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_btrfs_filesystem $SCRATCH_DEV
@@ -99,13 +99,13 @@ _check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/clones.snap
+_run_btrfs_util_prog receive -f $tmp/clones.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/clones.fssum $SCRATCH_MNT/clones_snap 2>> $seqres.full
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2 2>> $seqres.full
_scratch_unmount
@@ -104,9 +104,9 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_btrfs_filesystem $SCRATCH_DEV
@@ -114,10 +114,10 @@ _check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2 2>> $seqres.full
_scratch_unmount
@@ -97,9 +97,9 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_btrfs_filesystem $SCRATCH_DEV
@@ -107,10 +107,10 @@ _check_btrfs_filesystem $SCRATCH_DEV
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2 2>> $seqres.full
_scratch_unmount
@@ -126,9 +126,9 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2
_check_scratch_fs
@@ -136,10 +136,10 @@ _scratch_unmount
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -106,9 +106,9 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2
_check_scratch_fs
@@ -116,10 +116,10 @@ _scratch_unmount
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -352,10 +352,10 @@ run_check $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
$SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $tmp/2.snap
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $tmp/2.snap \
+ $SCRATCH_MNT/mysnap2
_check_scratch_fs
@@ -363,10 +363,10 @@ _scratch_unmount
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -282,17 +282,17 @@ md5sum $SCRATCH_MNT/mysnap0/foo | _filter_scratch
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
_check_scratch_fs
_scratch_unmount
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File digests in the replica filesystem:"
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
@@ -172,17 +172,17 @@ _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
touch $SCRATCH_MNT/testdir/subdir1/foobar2
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_scratch_fs
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
$BTRFS_UTIL_PROG property get $SCRATCH_MNT/mysnap2/testdir/subdir1 compression
$BTRFS_UTIL_PROG property get $SCRATCH_MNT/mysnap2/testdir/subdir1/foobar \
compression
@@ -92,7 +92,7 @@ done
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
_scratch_unmount
_check_scratch_fs
@@ -100,7 +100,7 @@ _check_scratch_fs
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
status=0
@@ -68,7 +68,7 @@ echo "hello world" > $TEST_PATH/amaiAdvancedStreamingPlugin.txt
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
_scratch_unmount
_check_scratch_fs
@@ -76,7 +76,7 @@ _check_scratch_fs
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
status=0
@@ -87,9 +87,9 @@ _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_scratch_fs
@@ -97,10 +97,10 @@ _check_scratch_fs
_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -85,9 +85,9 @@ mkdir $SCRATCH_MNT/first_subvol
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap2 -p $SCRATCH_MNT/mysnap1 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
_scratch_unmount
_check_scratch_fs
@@ -95,11 +95,11 @@ _check_scratch_fs
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
[ -e $SCRATCH_MNT/first_subvol ] && \
echo "Subvolume first_subvol was not supposed to be replicated by full send!"
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
[ -e $SCRATCH_MNT/testdir ] && \
echo "Directory testdir was supposed to be deleted after incremental send!"
@@ -77,7 +77,7 @@ sleep 3
# The send operation used to fail with -ESTALE due to the presence of the
# orphan inode.
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap -f /dev/null
+_run_btrfs_util_prog send -f /dev/null $SCRATCH_MNT/mysnap
status=0
exit
@@ -125,9 +125,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
_check_scratch_fs
@@ -135,10 +135,10 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -136,9 +136,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -146,10 +146,10 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -111,9 +111,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -121,9 +121,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -178,9 +178,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -188,9 +188,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -165,9 +165,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -175,9 +175,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -105,9 +105,9 @@ $CLONER_PROG -s $((44 * $BLOCK_SIZE)) -d $((44 * $BLOCK_SIZE)) -l $BLOCK_SIZE \
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
echo "File contents in the original filesystem:"
echo "mysnap1/foo"
@@ -123,8 +123,8 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File contents in the new filesystem:"
echo "mysnap1/foo"
@@ -96,9 +96,9 @@ $CLONER_PROG -s $(((32 + 12) * $BLOCK_SIZE)) -d $((4 * $BLOCK_SIZE)) \
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
echo "File contents in the original filesystem:"
od -t x1 $SCRATCH_MNT/mysnap2/foo | _filter_od
@@ -109,8 +109,8 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File contents in the new filesystem:"
od -t x1 $SCRATCH_MNT/mysnap2/foo | _filter_od
@@ -87,9 +87,9 @@ $XFS_IO_PROG -f -c "pwrite -S 0xbb 0 96K" \
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT/mysnap2 \
$SCRATCH_MNT/mysnap2_ro
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2_ro \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2_ro
echo "File digest in the original filesystem after being replaced:"
md5sum $SCRATCH_MNT/mysnap2_ro/foo/bar | _filter_scratch
@@ -100,8 +100,8 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File digest in the new filesystem:"
# Must match the digest from the new file.
@@ -77,7 +77,7 @@ echo "File digests in the original filesystem:"
md5sum $SCRATCH_MNT/snap/foo | _filter_scratch
md5sum $SCRATCH_MNT/snap/bar | _filter_scratch
-_run_btrfs_util_prog send $SCRATCH_MNT/snap -f $send_files_dir/1.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/snap
# Now recreate the filesystem by receiving the send stream and verify we get
# the same file contents that the original filesystem had.
@@ -85,7 +85,7 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
# We expect the destination filesystem to have exactly the same file data as
# the original filesystem.
@@ -87,7 +87,7 @@ echo "File digests in the original filesystem:"
md5sum $SCRATCH_MNT/snap/foo | _filter_scratch
md5sum $SCRATCH_MNT/snap/bar | _filter_scratch
-_run_btrfs_util_prog send $SCRATCH_MNT/snap -f $send_files_dir/1.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/snap
# Now recreate the filesystem by receiving the send stream and verify we get
# the same file contents that the original filesystem had.
@@ -100,7 +100,7 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
echo "File digests in the new filesystem:"
# Must match the digests we got in the original filesystem.
@@ -66,14 +66,14 @@ echo "File digest in the first filesystem, first snapshot:"
md5sum $SCRATCH_MNT/snap1/foo | _filter_scratch
# Save send stream for this snapshot.
-_run_btrfs_util_prog send $SCRATCH_MNT/snap1 -f $send_files_dir/1.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/snap1
# Create a new filesystem and receive the snapshot.
_scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
echo "File digest in the second filesystem, first snapshot:"
# Must match the digest we got in the first filesystem.
@@ -92,8 +92,8 @@ _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT/snap2_rw \
echo "File digest in the second filesystem, second snapshot:"
md5sum $SCRATCH_MNT/snap2/foo | _filter_scratch
-_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 $SCRATCH_MNT/snap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/snap2
# Create a new filesystem and receive both the first snapshot, through the first
# send stream we created, and the second snapshot through the incremental send
@@ -103,12 +103,12 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
# Receiving the second snapshot used to fail because the send stream used an
# incorrect value for the clone sources uuid field - it used the uuid of
# snapshot 1, which is different on each filesystem, instead of the received
# uuid value, which is preserved across different filesystems.
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File digests in the third filesystem:"
# Must match the digests we got in the previous filesystems.
@@ -74,17 +74,17 @@ md5sum $SCRATCH_MNT/snap2/foo | _filter_scratch
# Save send streams for the snapshots. For the first one we use a full send
# operation and the for the second snapshot we use an incremental send.
-_run_btrfs_util_prog send $SCRATCH_MNT/snap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 $SCRATCH_MNT/snap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/snap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/snap2
# Create a new filesystem and receive the snapshots.
_scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -vv -f $send_files_dir/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -vv -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -vv -f $send_files_dir/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -vv -f $send_files_dir/2.snap $SCRATCH_MNT
echo "File digests in the second filesystem:"
# Must match the digests we got in the first filesystem.
@@ -106,9 +106,9 @@ sync
# Now create send streams for the snapshots from this new filesystem. For the
# first snapshot we do a full send while for the second snapshot we do an
# incremental send.
-_run_btrfs_util_prog send $SCRATCH_MNT/snap1 -f $send_files_dir/1_2.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 $SCRATCH_MNT/snap2 \
- -f $send_files_dir/2_2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1_2.snap $SCRATCH_MNT/snap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 -f $send_files_dir/2_2.snap \
+ $SCRATCH_MNT/snap2
# Create a new filesystem and receive the send streams we just created from the
# second filesystem. This worked until the linux kernel 4.2, where a regression
@@ -120,8 +120,8 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -vv -f $send_files_dir/1_2.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -vv -f $send_files_dir/2_2.snap
+_run_btrfs_util_prog receive -vv -f $send_files_dir/1_2.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -vv -f $send_files_dir/2_2.snap $SCRATCH_MNT
echo "File digests in the third filesystem:"
# Must match the digests we got in the first and second filesystems.
@@ -80,10 +80,10 @@ _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/clones_snap
_run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/snap2
-_run_btrfs_util_prog send $SCRATCH_MNT/snap1 -f $tmp/1.snap
-_run_btrfs_util_prog send $SCRATCH_MNT/clones_snap -f $tmp/clones.snap
+_run_btrfs_util_prog send -f $tmp/1.snap $SCRATCH_MNT/snap1
+_run_btrfs_util_prog send -f $tmp/clones.snap $SCRATCH_MNT/clones_snap
_run_btrfs_util_prog send -p $SCRATCH_MNT/snap1 \
- -c $SCRATCH_MNT/clones_snap $SCRATCH_MNT/snap2 -f $tmp/2.snap
+ -c $SCRATCH_MNT/clones_snap -f $tmp/2.snap $SCRATCH_MNT/snap2
echo "File digests in the original filesystem:"
md5sum $SCRATCH_MNT/snap1/a/b/c/x | _filter_scratch
@@ -94,9 +94,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/1.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/clones.snap
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
+_run_btrfs_util_prog receive -f $tmp/1.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $tmp/clones.snap $SCRATCH_MNT
+_run_btrfs_util_prog receive -f $tmp/2.snap $SCRATCH_MNT
echo "File digests in the new filesystem:"
# Should match the digests we had in the original filesystem.
@@ -243,9 +243,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -253,9 +253,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -109,9 +109,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -119,9 +119,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -105,9 +105,9 @@ run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
run_check $FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-_run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
-_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap
+_run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
+_run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -115,9 +115,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
+_run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
+_run_btrfs_util_prog receive -f $send_files_dir/2.snap $SCRATCH_MNT
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
echo "Silence is golden"
@@ -71,8 +71,8 @@ mkdir $SCRATCH_MNT/a2
$BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
$SCRATCH_MNT/mysnap1 > /dev/null
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
- $send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
+ $SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
_scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
@@ -98,16 +98,16 @@ $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
# which causes a transaction commit and therefore bumps the filesystem's current
# generation to the value 9. All the inodes created end up getting a generation
# value of 9 and the snapshot's root inode (256) gets a generation value of 8.
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
rm $send_files_dir/1.snap
$FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
$FSSUM_PROG -A -f -w $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
- $send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
-$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
+ $SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2 2>&1 1>/dev/null | _filter_scratch
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -118,9 +118,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/2.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/2.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -105,10 +105,10 @@ $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
$FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
- $send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
-$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
+ $SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2 2>&1 1>/dev/null | _filter_scratch
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -116,9 +116,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/2.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/2.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -76,8 +76,8 @@ mv $SCRATCH_MNT/d1 $SCRATCH_MNT/d259_old/d1
$BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
$SCRATCH_MNT/mysnap1 > /dev/null
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
- $send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
+ $SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
_scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
@@ -109,16 +109,16 @@ $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
# which causes a transaction commit and therefore bumps the filesystem's current
# generation to the value 9. All the inodes created end up getting a generation
# value of 9 and the snapshot's root inode (256) gets a generation value of 8.
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
rm $send_files_dir/1.snap
$FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
$FSSUM_PROG -A -f -w $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
- $send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
-$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
- -f $send_files_dir/2.snap 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
+ $SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
+$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/mysnap2 2>&1 1>/dev/null | _filter_scratch
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -126,7 +126,7 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
# The receive of the incremental send stream used to fail because it contained
# a rmdir operation with an invalid path. The output of the receive command,
@@ -152,7 +152,7 @@ $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
# was incorrect because the inodes with number 259 in both snapshots are not the
# same, they have different generations.
#
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/2.snap > /dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/2.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
status=0
@@ -103,10 +103,10 @@ $XFS_IO_PROG -r -c "fiemap -v" $SCRATCH_MNT/snap2/bar | _filter_fiemap
echo
# Create the send streams to apply later on a new filesystem.
-$BTRFS_UTIL_PROG send $SCRATCH_MNT/snap1 -f $send_files_dir/1.snap 2>&1 \
+$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap $SCRATCH_MNT/snap1 2>&1 \
| _filter_scratch
-$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/snap1 $SCRATCH_MNT/snap2 \
- -f $send_files_dir/2.snap 2>&1 | _filter_scratch
+$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/snap1 -f $send_files_dir/2.snap \
+ $SCRATCH_MNT/snap2 2>&1 | _filter_scratch
# Create a new filesystem, receive the send streams and verify that the file
# contents are the same as in the original filesystem and that the file holes
@@ -114,8 +114,8 @@ $BTRFS_UTIL_PROG send -p $SCRATCH_MNT/snap1 $SCRATCH_MNT/snap2 \
_scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap >/dev/null
-$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/2.snap >/dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT >/dev/null
+$BTRFS_UTIL_PROG receive -f $send_files_dir/2.snap $SCRATCH_MNT >/dev/null
echo
echo "File digests in the new filesystem:"
The option parser in the btrfs utility is going to be updated and will accept arguments in a stricter form, namely that options must come before their non-option argument. Otherwise eg. the -f option in send would be understood as another path and not an option leading to many test failures. The canonical form should be: btrfs command subcommand [-options] [arguments] Signed-off-by: David Sterba <dsterba@suse.com> --- tests/btrfs/008 | 4 ++-- tests/btrfs/016 | 7 ++++--- tests/btrfs/019 | 2 +- tests/btrfs/025 | 10 +++++----- tests/btrfs/030 | 8 ++++---- tests/btrfs/034 | 10 +++++----- tests/btrfs/036 | 2 +- tests/btrfs/038 | 12 ++++++------ tests/btrfs/039 | 10 +++++----- tests/btrfs/040 | 10 +++++----- tests/btrfs/043 | 10 +++++----- tests/btrfs/044 | 10 +++++----- tests/btrfs/045 | 10 +++++----- tests/btrfs/046 | 10 +++++----- tests/btrfs/048 | 10 +++++----- tests/btrfs/050 | 4 ++-- tests/btrfs/051 | 4 ++-- tests/btrfs/053 | 10 +++++----- tests/btrfs/054 | 10 +++++----- tests/btrfs/058 | 2 +- tests/btrfs/077 | 10 +++++----- tests/btrfs/083 | 10 +++++----- tests/btrfs/084 | 10 +++++----- tests/btrfs/087 | 10 +++++----- tests/btrfs/092 | 10 +++++----- tests/btrfs/094 | 10 +++++----- tests/btrfs/097 | 10 +++++----- tests/btrfs/105 | 10 +++++----- tests/btrfs/108 | 4 ++-- tests/btrfs/109 | 4 ++-- tests/btrfs/110 | 12 ++++++------ tests/btrfs/111 | 20 ++++++++++---------- tests/btrfs/117 | 12 ++++++------ tests/btrfs/127 | 10 +++++----- tests/btrfs/128 | 10 +++++----- tests/btrfs/129 | 10 +++++----- tests/btrfs/133 | 18 +++++++++--------- tests/btrfs/134 | 12 ++++++------ tests/btrfs/135 | 18 +++++++++--------- tests/btrfs/137 | 10 +++++----- 40 files changed, 188 insertions(+), 187 deletions(-)