HomeFreeBSD

Fix zdb -ed on objset for exported pool

Description

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

Details

Provenance
Chunwei Chen <david.chen@nutanix.com>Authored on Feb 2 2018, 12:36 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 9 2018, 6:11 PM
Parents
rG5e3bd0e684a3: Fix zdb -E segfault
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGeb9c4532dda3: Fix zdb -ed on objset for exported pool (authored by Chunwei Chen <david.chen@nutanix.com>).Feb 9 2018, 6:11 PM