]> git.proxmox.com Git - mirror_zfs.git/commit - tests/runfiles/linux.run
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)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Feb 2018 18:11:34 +0000 (10:11 -0800)
commiteb9c4532dda34bcf0612c2c797cb3fcab9a21b4f
tree54660cc9cc34123d0916bc915db406c190bf8920
parent5e3bd0e684a3c32bd22647938247ac3699c5372a
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]