]> git.proxmox.com Git - mirror_zfs.git/commit
Fix zfs incremental send remove '-o' properties
authorLOLi <loli10K@users.noreply.github.com>
Tue, 1 May 2018 03:58:29 +0000 (05:58 +0200)
committerTony Hutter <hutter2@llnl.gov>
Fri, 6 Jul 2018 09:46:51 +0000 (02:46 -0700)
commitfe8de1c8a653fed150979f7d37be8f189327b7ef
tree2897b5ba2668d5ead957ea4f1fa78c9232de3653
parent1bd93ea1e0df994e9055db8666b073ae692279f9
Fix zfs incremental send remove '-o' properties

When receiving an incremental send stream with intermediary snapshots
zfs_receive_one() does not correctly identify the top-level dataset:
consequently we restore said snapshots as if they were children
datasets in the hierarchy, forcing inheritance of any property received
with 'zfs send -o' and effectively removing any locally set value.

The test case did not correctly verify this situation because it uses
adjacent snapshots, basically testing 'zfs send -i' instead of
'zfs send -I': this commit adds an additional intermediary snapshot to
the test script.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7478
lib/libzfs/libzfs_sendrecv.c
tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh