]> git.proxmox.com Git - mirror_zfs.git/commit
Fix zdb -ed on objset for exported pool
authorChunwei Chen <david.chen@nutanix.com>
Fri, 2 Feb 2018 00:36:40 +0000 (16:36 -0800)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:37 +0000 (16:10 -0700)
commit478754a8f5ff0f3b9f6dfe4ce272efc1681d243e
tree0fdbc624d7f3d17de27cc2424c90ba6717eccd57
parent31ff122aa2e20c7ed48617868085ddba7b4ad174
Fix zdb -ed on objset for exported pool

zdb -ed on objset for exported pool would failed with:
  failed to own dataset 'qq/fs0': No such file or directory

The reason is that zdb pass objset name to spa_import, it uses that
name to create a spa. Later, when dmu_objset_own tries to lookup the spa
using real pool name, it can't find one.

We fix this by make sure we pass pool name rather than objset name to
spa_import.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #7099
Closes #6464
cmd/zdb/zdb.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/clean_mirror/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zdb/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zdb/zdb_006_pos.ksh [new file with mode: 0755]