mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com> Closes #5534 Issue #4802
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user