summaryrefslogtreecommitdiffstats
path: root/include/sys/zap.h
diff options
context:
space:
mode:
authorbzzz77 <[email protected]>2017-01-14 01:58:41 +0300
committerBrian Behlendorf <[email protected]>2017-01-13 14:58:41 -0800
commit0eef1bde31d67091d3deed23fe2394f5a8bf2276 (patch)
treef16df818c69345a235c436a2e6d565d53657bf46 /include/sys/zap.h
parent38640550f28c5acd94621f3452fab428df469bdb (diff)
Add *_by-dnode routines
Add *_by_dnode() routines for accessing objects given their dnode_t *, this is more efficient than accessing the object by (objset_t *, uint64_t object). This change converts some but not all of the existing consumers. As performance-sensitive code paths are discovered they should be converted to use these routines. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alex Zhuravlev <[email protected]> Closes #5534 Issue #4802
Diffstat (limited to 'include/sys/zap.h')
-rw-r--r--include/sys/zap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sys/zap.h b/include/sys/zap.h
index c4169029a..ba75ac58f 100644
--- a/include/sys/zap.h
+++ b/include/sys/zap.h
@@ -255,6 +255,9 @@ int zap_count_write_by_dnode(dnode_t *dn, const char *name,
int zap_add(objset_t *ds, uint64_t zapobj, const char *key,
int integer_size, uint64_t num_integers,
const void *val, dmu_tx_t *tx);
+int zap_add_by_dnode(dnode_t *dn, const char *key,
+ int integer_size, uint64_t num_integers,
+ const void *val, dmu_tx_t *tx);
int zap_add_uint64(objset_t *ds, uint64_t zapobj, const uint64_t *key,
int key_numints, int integer_size, uint64_t num_integers,
const void *val, dmu_tx_t *tx);
@@ -294,6 +297,7 @@ int zap_length_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
int zap_remove(objset_t *ds, uint64_t zapobj, const char *name, dmu_tx_t *tx);
int zap_remove_norm(objset_t *ds, uint64_t zapobj, const char *name,
matchtype_t mt, dmu_tx_t *tx);
+int zap_remove_by_dnode(dnode_t *dn, const char *name, dmu_tx_t *tx);
int zap_remove_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
int key_numints, dmu_tx_t *tx);