mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
OpenZFS 2605, 6980, 6902
2605 want to resume interrupted zfs send Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Xin Li <delphij@freebsd.org> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@omniti.com> Ported-by: kernelOfTruth <kerneloftruth@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/2605 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9c3fd12 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Ported by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/6980 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ea4a67f Porting notes: - All rsend and snapshop tests enabled and updated for Linux. - Fix misuse of input argument in traverse_visitbp(). - Fix ISO C90 warnings and errors. - Fix gcc 'missing braces around initializer' in 'struct send_thread_arg to_arg =' warning. - Replace 4 argument fletcher_4_native() with 3 argument version, this change was made in OpenZFS 4185 which has not been ported. - Part of the sections for 'zfs receive' and 'zfs send' was rewritten and reordered to approximate upstream. - Fix mktree xattr creation, 'user.' prefix required. - Minor fixes to newly enabled test cases - Long holds for volumes allowed during receive for minor registration.
This commit is contained in:
committed by
Brian Behlendorf
parent
669cf0ab29
commit
47dfff3b86
@@ -10,4 +10,7 @@ dist_pkgdata_SCRIPTS = \
|
||||
zfs_receive_006_pos.ksh \
|
||||
zfs_receive_007_neg.ksh \
|
||||
zfs_receive_008_pos.ksh \
|
||||
zfs_receive_009_neg.ksh
|
||||
zfs_receive_009_neg.ksh \
|
||||
zfs_receive_010_pos.ksh \
|
||||
zfs_receive_011_pos.ksh \
|
||||
zfs_receive_012_pos.ksh
|
||||
|
||||
@@ -61,7 +61,7 @@ test_pool ()
|
||||
first_object=$(ls -i $mntpnt | awk '{print $1}')
|
||||
log_must $ZFS snapshot $POOL/fs@a
|
||||
while true; do
|
||||
log_must $FIND $mntpnt -delete
|
||||
log_must $FIND $mntpnt/* -delete
|
||||
sync
|
||||
log_must $MKFILES "$mntpnt/" 4000
|
||||
FILE=$(ls -i $mntpnt | awk \
|
||||
|
||||
@@ -74,9 +74,11 @@ function setup_test_model
|
||||
if is_global_zone ; then
|
||||
log_must $ZFS create -V 16M $pool/vol
|
||||
log_must $ZFS create -V 16M $pool/$FS/vol
|
||||
block_device_wait
|
||||
|
||||
log_must $ZFS snapshot $pool/$FS/vol@vsnap
|
||||
log_must $ZFS clone $pool/$FS/vol@vsnap $pool/$FS/vclone
|
||||
block_device_wait
|
||||
fi
|
||||
|
||||
log_must snapshot_tree $pool/$FS/fs1/fs2@fsnap
|
||||
@@ -199,10 +201,10 @@ function cmp_ds_prop
|
||||
typeset dtst1=$1
|
||||
typeset dtst2=$2
|
||||
|
||||
for item in "type" "origin" "volblocksize" "aclinherit" "aclmode" \
|
||||
for item in "type" "origin" "volblocksize" "aclinherit" "acltype" \
|
||||
"atime" "canmount" "checksum" "compression" "copies" "devices" \
|
||||
"dnodesize" "exec" "quota" "readonly" "recordsize" "reservation" \
|
||||
"setuid" "sharenfs" "snapdir" "version" "volsize" "xattr" "zoned" \
|
||||
"setuid" "snapdir" "version" "volsize" "xattr" "zoned" \
|
||||
"mountpoint";
|
||||
do
|
||||
$ZFS get -H -o property,value,source $item $dtst1 >> \
|
||||
@@ -393,7 +395,7 @@ function mk_files
|
||||
for ((i=0; i<$nfiles; i=i+1)); do
|
||||
$DD if=/dev/urandom \
|
||||
of=/$fs/file-$maxsize-$((i+$file_id_offset)) \
|
||||
bs=$(($RANDOM * $RANDOM % $maxsize)) \
|
||||
bs=$((($RANDOM * $RANDOM % ($maxsize - 1)) + 1)) \
|
||||
count=1 >/dev/null 2>&1 || log_fail \
|
||||
"Failed to create /$fs/file-$maxsize-$((i+$file_id_offset))"
|
||||
done
|
||||
@@ -438,7 +440,7 @@ function mess_file
|
||||
# write the same value that's already there.
|
||||
#
|
||||
log_must eval "$DD if=/dev/urandom of=$file conv=notrunc " \
|
||||
"bs=1 count=2 oseek=$offset >/dev/null 2>&1"
|
||||
"bs=1 count=2 seek=$offset >/dev/null 2>&1"
|
||||
else
|
||||
log_must $TRUNCATE -s $offset $file
|
||||
fi
|
||||
@@ -523,20 +525,20 @@ function test_fs_setup
|
||||
mk_files 100 1048576 0 $sendfs &
|
||||
mk_files 10 10485760 0 $sendfs &
|
||||
mk_files 1 104857600 0 $sendfs &
|
||||
log_must $WAIT
|
||||
wait
|
||||
log_must $ZFS snapshot $sendfs@a
|
||||
|
||||
rm_files 200 256 0 $sendfs &
|
||||
rm_files 200 131072 0 $sendfs &
|
||||
rm_files 20 1048576 0 $sendfs &
|
||||
rm_files 2 10485760 0 $sendfs &
|
||||
log_must $WAIT
|
||||
wait
|
||||
|
||||
mk_files 400 256 0 $sendfs &
|
||||
mk_files 400 131072 0 $sendfs &
|
||||
mk_files 40 1048576 0 $sendfs &
|
||||
mk_files 4 10485760 0 $sendfs &
|
||||
log_must $WAIT
|
||||
wait
|
||||
|
||||
log_must $ZFS snapshot $sendfs@b
|
||||
log_must eval "$ZFS send -v $sendfs@a >/$sendpool/initial.zsend"
|
||||
|
||||
@@ -110,9 +110,6 @@ function cleanup
|
||||
log_must $ZFS inherit $prop $POOL2
|
||||
done
|
||||
|
||||
#if is_shared $POOL; then
|
||||
# log_must $ZFS set sharenfs=off $POOL
|
||||
#fi
|
||||
log_must setup_test_model $POOL
|
||||
|
||||
if [[ -d $TESTDIR ]]; then
|
||||
@@ -131,7 +128,7 @@ for fs in "$POOL" "$POOL/pclone" "$POOL/$FS" "$POOL/$FS/fs1" \
|
||||
"$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do
|
||||
rand_set_prop $fs aclinherit "discard" "noallow" "secure" "passthrough"
|
||||
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
|
||||
rand_set_prop $fs aclmode "discard" "groupmask" "passthrough"
|
||||
rand_set_prop $fs acltype "off" "noacl" "posixacl"
|
||||
rand_set_prop $fs atime "on" "off"
|
||||
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
|
||||
rand_set_prop $fs compression "on" "off" "lzjb" "gzip" \
|
||||
@@ -161,7 +158,8 @@ done
|
||||
|
||||
|
||||
# Verify inherited property can be received
|
||||
rand_set_prop $POOL sharenfs "on" "off" "rw"
|
||||
rand_set_prop $POOL redundant_metadata "all" "most"
|
||||
rand_set_prop $POOL sync "standard" "always" "disabled"
|
||||
|
||||
#
|
||||
# Duplicate POOL2 for testing
|
||||
|
||||
Regular → Executable
+1
@@ -46,6 +46,7 @@ log_must cleanup_pool $POOL2
|
||||
|
||||
log_must eval "$ZFS send -R $POOL/$FS@final > $BACKDIR/fs-final-R"
|
||||
log_must eval "$ZFS receive -d $POOL2 < $BACKDIR/fs-final-R"
|
||||
block_device_wait
|
||||
log_must eval "$ZPOOL export $POOL"
|
||||
log_must eval "$ZPOOL import $POOL"
|
||||
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user