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

Function zap_add_uint64

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

Source from the content-addressed store, hash-verified

1293}
1294
1295int
1296zap_add_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
1297 int key_numints, int integer_size, uint64_t num_integers,
1298 const void *val, dmu_tx_t *tx)
1299{
1300 zap_t *zap;
1301
1302 int err =
1303 zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap);
1304 if (err != 0)
1305 return (err);
1306 zap_name_t *zn = zap_name_alloc_uint64(zap, key, key_numints);
1307 if (zn == NULL) {
1308 zap_unlockdir(zap, FTAG);
1309 return (SET_ERROR(ENOTSUP));
1310 }
1311 err = fzap_add(zn, integer_size, num_integers, val, FTAG, tx);
1312 zap = zn->zn_zap; /* fzap_add() may change zap */
1313 zap_name_free(zn);
1314 if (zap != NULL) /* may be NULL if fzap_add() failed */
1315 zap_unlockdir(zap, FTAG);
1316 return (err);
1317}
1318
1319int
1320zap_update(objset_t *os, uint64_t zapobj, const char *name,

Callers

nothing calls this directly

Calls 5

zap_lockdirFunction · 0.85
zap_name_alloc_uint64Function · 0.85
zap_unlockdirFunction · 0.85
fzap_addFunction · 0.85
zap_name_freeFunction · 0.85

Tested by

no test coverage detected