MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zap_count

Function zap_count

freebsd/contrib/openzfs/module/zfs/zap_micro.c:896–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894}
895
896int
897zap_count(objset_t *os, uint64_t zapobj, uint64_t *count)
898{
899 zap_t *zap;
900
901 int err =
902 zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap);
903 if (err != 0)
904 return (err);
905 if (!zap->zap_ismicro) {
906 err = fzap_count(zap, count);
907 } else {
908 *count = zap->zap_m.zap_num_entries;
909 }
910 zap_unlockdir(zap, FTAG);
911 return (err);
912}
913
914/*
915 * zn may be NULL; if not specified, it will be computed if needed.

Callers 15

zfs_rmnodeFunction · 0.85
zfsctl_snapdir_getattrFunction · 0.85
zfs_rmnodeFunction · 0.85
zfs_diremptyFunction · 0.85
spa_get_errlog_sizeFunction · 0.85
dsl_dataset_hold_objFunction · 0.85
get_clones_stat_implFunction · 0.85
dsl_dataset_promoteFunction · 0.85
livelist_delete_syncFunction · 0.85

Calls 3

zap_lockdirFunction · 0.85
fzap_countFunction · 0.85
zap_unlockdirFunction · 0.85

Tested by 2

ztest_zap_parallelFunction · 0.68