summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorTim Haley <[email protected]>2011-07-26 16:38:27 -0700
committerBrian Behlendorf <[email protected]>2011-08-01 12:09:02 -0700
commit7b8518cb8d39aa340fecf559143763b27b212b0d (patch)
tree2791f71b8e20311c41c0a6e480d06dde7e157742 /module/zfs
parentbfb73f92773dc3471e3a6274970c02e0700b6c7d (diff)
Illumos #xxx: zdb -vvv broken after zfs diff integration
References to Illumos issue and patch: - https://github.com/illumos/illumos-gate/commit/163eb7ff Signed-off-by: Brian Behlendorf <[email protected]> Issue #340
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_znode.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index ea8b4c505..dfbe11aca 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -1560,12 +1560,12 @@ zfs_sa_setup(objset_t *osp, sa_attr_type_t **sa_table)
static int
zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp,
- dmu_buf_t **db)
+ dmu_buf_t **db, void *tag)
{
dmu_object_info_t doi;
int error;
- if ((error = sa_buf_hold(osp, obj, FTAG, db)) != 0)
+ if ((error = sa_buf_hold(osp, obj, tag, db)) != 0)
return (error);
dmu_object_info_from_db(*db, &doi);
@@ -1573,13 +1573,13 @@ zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp,
doi.doi_bonus_type != DMU_OT_ZNODE) ||
(doi.doi_bonus_type == DMU_OT_ZNODE &&
doi.doi_bonus_size < sizeof (znode_phys_t))) {
- sa_buf_rele(*db, FTAG);
+ sa_buf_rele(*db, tag);
return (ENOTSUP);
}
error = sa_handle_get(osp, obj, NULL, SA_HDL_PRIVATE, hdlp);
if (error != 0) {
- sa_buf_rele(*db, FTAG);
+ sa_buf_rele(*db, tag);
return (error);
}
@@ -1587,10 +1587,10 @@ zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp,
}
void
-zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db)
+zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, void *tag)
{
sa_handle_destroy(hdl);
- sa_buf_rele(db, FTAG);
+ sa_buf_rele(db, tag);
}
/*
@@ -1667,7 +1667,7 @@ zfs_obj_to_path_impl(objset_t *osp, uint64_t obj, sa_handle_t *hdl,
int is_xattrdir;
if (prevdb)
- zfs_release_sa_handle(prevhdl, prevdb);
+ zfs_release_sa_handle(prevhdl, prevdb, FTAG);
if ((error = zfs_obj_to_pobj(sa_hdl, sa_table, &pobj,
&is_xattrdir)) != 0)
@@ -1699,7 +1699,7 @@ zfs_obj_to_path_impl(objset_t *osp, uint64_t obj, sa_handle_t *hdl,
prevhdl = sa_hdl;
prevdb = sa_db;
}
- error = zfs_grab_sa_handle(osp, obj, &sa_hdl, &sa_db);
+ error = zfs_grab_sa_handle(osp, obj, &sa_hdl, &sa_db, FTAG);
if (error != 0) {
sa_hdl = prevhdl;
sa_db = prevdb;
@@ -1709,7 +1709,7 @@ zfs_obj_to_path_impl(objset_t *osp, uint64_t obj, sa_handle_t *hdl,
if (sa_hdl != NULL && sa_hdl != hdl) {
ASSERT(sa_db != NULL);
- zfs_release_sa_handle(sa_hdl, sa_db);
+ zfs_release_sa_handle(sa_hdl, sa_db, FTAG);
}
if (error == 0)
@@ -1730,13 +1730,13 @@ zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len)
if (error != 0)
return (error);
- error = zfs_grab_sa_handle(osp, obj, &hdl, &db);
+ error = zfs_grab_sa_handle(osp, obj, &hdl, &db, FTAG);
if (error != 0)
return (error);
error = zfs_obj_to_path_impl(osp, obj, hdl, sa_table, buf, len);
- zfs_release_sa_handle(hdl, db);
+ zfs_release_sa_handle(hdl, db, FTAG);
return (error);
}
@@ -1756,19 +1756,19 @@ zfs_obj_to_stats(objset_t *osp, uint64_t obj, zfs_stat_t *sb,
if (error != 0)
return (error);
- error = zfs_grab_sa_handle(osp, obj, &hdl, &db);
+ error = zfs_grab_sa_handle(osp, obj, &hdl, &db, FTAG);
if (error != 0)
return (error);
error = zfs_obj_to_stats_impl(hdl, sa_table, sb);
if (error != 0) {
- zfs_release_sa_handle(hdl, db);
+ zfs_release_sa_handle(hdl, db, FTAG);
return (error);
}
error = zfs_obj_to_path_impl(osp, obj, hdl, sa_table, buf, len);
- zfs_release_sa_handle(hdl, db);
+ zfs_release_sa_handle(hdl, db, FTAG);
return (error);
}