]> git.proxmox.com Git - mirror_zfs.git/commit - tests/zfs-tests/tests/functional/cli_root/zfs_remap/zfs_remap_obsolete_counts.ksh
Fix 'zfs remap <poolname@snapname>'
authorLOLi <loli10K@users.noreply.github.com>
Thu, 19 Apr 2018 16:45:17 +0000 (18:45 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 19 Apr 2018 16:45:17 +0000 (09:45 -0700)
commitb4555c777a0be3c0dba29662d278c57099c60a87
tree5e2c2e713a6c9d38ba9d5b993009be1419f39084
parent599b8648133738b524ff4c58a72fc744b62fe142
Fix 'zfs remap <poolname@snapname>'

Only filesystems and volumes are valid 'zfs remap' parameters: when
passed a snapshot name zfs_remap_indirects() does not handle the
EINVAL returned from libzfs_core, which results in failing an assertion
and consequently crashing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7454
cmd/zfs/zfs_main.c
configure.ac
lib/libzfs/libzfs_dataset.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_remap/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_remap/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_remap/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_remap/zfs_remap_cliargs.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_remap/zfs_remap_obsolete_counts.ksh [new file with mode: 0755]