Skip to content

Commit 0ed1cf9

Browse files
committed
Address feedback
Signed-off-by: Paul Dagnelie <[email protected]>
1 parent 69f616d commit 0ed1cf9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmd/zdb/zdb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ dump_bookmark(dsl_pool_t *dp, char *name, boolean_t print_redact,
19221922
}
19231923

19241924
static void
1925-
dump_bookmarks(objset_t *os, const char *osname, int verbosity)
1925+
dump_bookmarks(objset_t *os, int verbosity)
19261926
{
19271927
zap_cursor_t zc;
19281928
zap_attribute_t attr;
@@ -1931,18 +1931,20 @@ dump_bookmarks(objset_t *os, const char *osname, int verbosity)
19311931
objset_t *mos = os->os_spa->spa_meta_objset;
19321932
if (verbosity < 4)
19331933
return;
1934-
VERIFY0(dsl_pool_hold(osname, FTAG, &dp));
1934+
dsl_pool_config_enter(dp, FTAG);
19351935

19361936
for (zap_cursor_init(&zc, mos, ds->ds_bookmarks_obj);
19371937
zap_cursor_retrieve(&zc, &attr) == 0;
19381938
zap_cursor_advance(&zc)) {
1939+
char osname[ZFS_MAX_DATASET_NAME_LEN];
19391940
char buf[ZFS_MAX_DATASET_NAME_LEN];
1941+
dmu_objset_name(os, osname);
19401942
VERIFY0(snprintf(buf, sizeof (buf), "%s#%s", osname,
19411943
attr.za_name));
19421944
(void) dump_bookmark(dp, buf, verbosity >= 5, verbosity >= 6);
19431945
}
19441946
zap_cursor_fini(&zc);
1945-
dsl_pool_rele(dp, FTAG);
1947+
dsl_pool_config_exit(dp, FTAG);
19461948
}
19471949

19481950
static void
@@ -2057,7 +2059,7 @@ open_objset(const char *path, void *tag, objset_t **osp)
20572059
/*
20582060
* We can't own an objset if it's redacted. Therefore, we do this
20592061
* dance: hold the objset, then acquire a long hold on its dataset, then
2060-
* release the pool.
2062+
* release the pool (which is held as part of holding the objset).
20612063
*/
20622064
err = dmu_objset_hold(path, tag, osp);
20632065
if (err != 0) {
@@ -2660,7 +2662,7 @@ dump_dir(objset_t *os)
26602662
}
26612663

26622664
if (dmu_objset_ds(os) != NULL)
2663-
dump_bookmarks(os, osname, verbosity);
2665+
dump_bookmarks(os, verbosity);
26642666

26652667
if (verbosity < 2)
26662668
return;

0 commit comments

Comments
 (0)