Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mismatched nvlist names in zfs_keys_send_space #10978

Merged
merged 1 commit into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions module/zfs/zfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6429,8 +6429,10 @@ send_space_sum(objset_t *os, void *buf, int len, void *arg)
* presence indicates DRR_WRITE_EMBEDDED records are permitted
* (optional) "compressok" -> (value ignored)
* presence indicates compressed DRR_WRITE records are permitted
* (optional) "rawok" -> (value ignored)
* (optional) "rawok" -> (value ignored)
* presence indicates raw encrypted records should be used.
* (optional) "resume_object" and "resume_offset" -> (uint64)
* if present, resume send stream from specified object and offset.
* (optional) "fd" -> file descriptor to use as a cookie for progress
* tracking (int32)
* }
Expand All @@ -6448,9 +6450,9 @@ static const zfs_ioc_key_t zfs_keys_send_space[] = {
{"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL},
{"fd", DATA_TYPE_INT32, ZK_OPTIONAL},
{"redactbook", DATA_TYPE_STRING, ZK_OPTIONAL},
{"resumeobj", DATA_TYPE_UINT64, ZK_OPTIONAL},
{"resumeoff", DATA_TYPE_UINT64, ZK_OPTIONAL},
{"bytes", DATA_TYPE_UINT64, ZK_OPTIONAL},
{"resume_object", DATA_TYPE_UINT64, ZK_OPTIONAL},
{"resume_offset", DATA_TYPE_UINT64, ZK_OPTIONAL},
{"bytes", DATA_TYPE_UINT64, ZK_OPTIONAL},
};

static int
Expand Down
13 changes: 10 additions & 3 deletions tests/zfs-tests/tests/functional/rsend/rsend.kshlib
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,14 @@ function file_check
# $1 The ZFS send command
# $2 The filesystem where the streams are sent
# $3 The receive filesystem
# $4 Test dry-run (optional)
#
function resume_test
{
sendcmd=$1
streamfs=$2
recvfs=$3
typeset sendcmd=$1
typeset streamfs=$2
typeset recvfs=$3
typeset dryrun=${4:-1}

stream_num=1
log_must eval "$sendcmd >/$streamfs/$stream_num"
Expand All @@ -651,6 +653,11 @@ function resume_test
stream_num=$((stream_num+1))

token=$(zfs get -Hp -o value receive_resume_token $recvfs)

# Do a dry-run
[ $dryrun -ne 0 ] && \
log_must eval "zfs send -nvt $token > /dev/null"

log_must eval "zfs send -t $token >/$streamfs/$stream_num"
[[ -f /$streamfs/$stream_num ]] || \
log_fail "NO FILE /$streamfs/$stream_num"
Expand Down
2 changes: 1 addition & 1 deletion tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ log_onexit resume_cleanup $sendfs $streamfs

test_fs_setup $sendfs $recvfs $streamfs
log_must zfs unmount -f $sendfs
resume_test "zfs send $sendfs" $streamfs $recvfs
resume_test "zfs send $sendfs" $streamfs $recvfs 0
file_check $sendfs $recvfs

log_pass "Verify resumability of a full ZFS send/receive with the source " \
Expand Down