]> granicus.if.org Git - zfs/commit
zfs promote|rename .../%recv should be an error
authorLOLi <loli10K@users.noreply.github.com>
Fri, 28 Jul 2017 21:12:34 +0000 (23:12 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 Jul 2017 21:12:34 +0000 (14:12 -0700)
commit650258d7c786b8e62ca847a926f6f038cd3e5d94
treefa73fa616fd82d562bc143efcd8e25e94aa7e2bf
parentf06f53fa3f566056fd3a03737032f1bd6bcf48bc
zfs promote|rename .../%recv should be an error

If we are in the middle of an incremental 'zfs receive', the child
.../%recv will exist. If we run 'zfs promote' .../%recv, it will "work",
but then zfs gets confused about the status of the new dataset.
Attempting to do this promote should be an error.

Similarly renaming .../%recv datasets should not be allowed.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #4843
Closes #6339
lib/libzfs/libzfs_dataset.c
module/zfs/zfs_ioctl.c
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_006_neg.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename.cfg
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename.kshlib
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_004_neg.ksh