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
This commit is contained in:
Chunwei Chen
2018-02-01 16:36:40 -08:00
committed by Brian Behlendorf
parent 5e3bd0e684
commit eb9c4532dd
5 changed files with 90 additions and 15 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ tags = ['functional', 'clean_mirror']
[tests/functional/cli_root/zdb]
tests = ['zdb_001_neg', 'zdb_002_pos', 'zdb_003_pos', 'zdb_004_pos',
'zdb_005_pos']
'zdb_005_pos', 'zdb_006_pos']
pre =
post =
tags = ['functional', 'cli_root', 'zdb']