]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dsl_prop.c
Fix dsl_props_set_sync_impl to work with nested nvlist
authorLOLi <loli10K@users.noreply.github.com>
Wed, 21 Dec 2016 02:46:59 +0000 (03:46 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 21 Dec 2016 02:46:59 +0000 (18:46 -0800)
commit5f1346c29997dd4e02acf4c19c875d5484f33b1e
treeaf7d163de6a51282e16c4e8f02f8689a4ef1511f
parenta3823f428deb8f15dd383dc6210b2e16926f4217
Fix dsl_props_set_sync_impl to work with nested nvlist

When iterating over the input nvlist in dsl_props_set_sync_impl() when we don't
preserve the nvpair name before looking up ZPROP_VALUE, so when we later go to
process it nvpair_name() is always "value" and not the actual property name.

This fixes a couple of bugs in zfs_ioc_recv():
* Received properties were not restored correctly when failing to receive an
incremental send stream
* Received properties were not completely replaced by the new ones when
successfully receiving an incremental send stream

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #5497
module/zfs/dsl_prop.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_014_pos.ksh [new file with mode: 0755]