aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_objset.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/dmu_objset.c')
-rw-r--r--module/zfs/dmu_objset.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index c112e93e0..a02591b98 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -1465,12 +1465,12 @@ dmu_snapshot_realname(objset_t *os, char *name, char *real, int maxlen,
dsl_dataset_t *ds = os->os_dsl_dataset;
uint64_t ignored;
- if (ds->ds_phys->ds_snapnames_zapobj == 0)
+ if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0)
return (SET_ERROR(ENOENT));
return (zap_lookup_norm(ds->ds_dir->dd_pool->dp_meta_objset,
- ds->ds_phys->ds_snapnames_zapobj, name, 8, 1, &ignored, MT_FIRST,
- real, maxlen, conflict));
+ dsl_dataset_phys(ds)->ds_snapnames_zapobj, name, 8, 1, &ignored,
+ MT_FIRST, real, maxlen, conflict));
}
int
@@ -1483,12 +1483,12 @@ dmu_snapshot_list_next(objset_t *os, int namelen, char *name,
ASSERT(dsl_pool_config_held(dmu_objset_pool(os)));
- if (ds->ds_phys->ds_snapnames_zapobj == 0)
+ if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0)
return (SET_ERROR(ENOENT));
zap_cursor_init_serialized(&cursor,
ds->ds_dir->dd_pool->dp_meta_objset,
- ds->ds_phys->ds_snapnames_zapobj, *offp);
+ dsl_dataset_phys(ds)->ds_snapnames_zapobj, *offp);
if (zap_cursor_retrieve(&cursor, &attr) != 0) {
zap_cursor_fini(&cursor);
@@ -1528,12 +1528,12 @@ dmu_dir_list_next(objset_t *os, int namelen, char *name,
/* there is no next dir on a snapshot! */
if (os->os_dsl_dataset->ds_object !=
- dd->dd_phys->dd_head_dataset_obj)
+ dsl_dir_phys(dd)->dd_head_dataset_obj)
return (SET_ERROR(ENOENT));
zap_cursor_init_serialized(&cursor,
dd->dd_pool->dp_meta_objset,
- dd->dd_phys->dd_child_dir_zapobj, *offp);
+ dsl_dir_phys(dd)->dd_child_dir_zapobj, *offp);
if (zap_cursor_retrieve(&cursor, &attr) != 0) {
zap_cursor_fini(&cursor);
@@ -1581,7 +1581,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
return (0);
}
- thisobj = dd->dd_phys->dd_head_dataset_obj;
+ thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj;
attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP);
/*
@@ -1589,7 +1589,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
*/
if (flags & DS_FIND_CHILDREN) {
for (zap_cursor_init(&zc, dp->dp_meta_objset,
- dd->dd_phys->dd_child_dir_zapobj);
+ dsl_dir_phys(dd)->dd_child_dir_zapobj);
zap_cursor_retrieve(&zc, attr) == 0;
(void) zap_cursor_advance(&zc)) {
ASSERT3U(attr->za_integer_length, ==,
@@ -1618,7 +1618,9 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds);
if (err == 0) {
- uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj;
+ uint64_t snapobj;
+
+ snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj;
dsl_dataset_rele(ds, FTAG);
for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj);
@@ -1693,7 +1695,7 @@ dmu_objset_find_impl(spa_t *spa, const char *name,
return (0);
}
- thisobj = dd->dd_phys->dd_head_dataset_obj;
+ thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj;
attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP);
/*
@@ -1701,7 +1703,7 @@ dmu_objset_find_impl(spa_t *spa, const char *name,
*/
if (flags & DS_FIND_CHILDREN) {
for (zap_cursor_init(&zc, dp->dp_meta_objset,
- dd->dd_phys->dd_child_dir_zapobj);
+ dsl_dir_phys(dd)->dd_child_dir_zapobj);
zap_cursor_retrieve(&zc, attr) == 0;
(void) zap_cursor_advance(&zc)) {
ASSERT3U(attr->za_integer_length, ==,
@@ -1734,7 +1736,9 @@ dmu_objset_find_impl(spa_t *spa, const char *name,
err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds);
if (err == 0) {
- uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj;
+ uint64_t snapobj;
+
+ snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj;
dsl_dataset_rele(ds, FTAG);
for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj);