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

Function zap_remove_impl

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

Source from the content-addressed store, hash-verified

1392}
1393
1394static int
1395zap_remove_impl(zap_t *zap, const char *name,
1396 matchtype_t mt, dmu_tx_t *tx)
1397{
1398 int err = 0;
1399
1400 zap_name_t *zn = zap_name_alloc(zap, name, mt);
1401 if (zn == NULL)
1402 return (SET_ERROR(ENOTSUP));
1403 if (!zap->zap_ismicro) {
1404 err = fzap_remove(zn, tx);
1405 } else {
1406 mzap_ent_t *mze = mze_find(zn);
1407 if (mze == NULL) {
1408 err = SET_ERROR(ENOENT);
1409 } else {
1410 zap->zap_m.zap_num_entries--;
1411 bzero(&zap_m_phys(zap)->mz_chunk[mze->mze_chunkid],
1412 sizeof (mzap_ent_phys_t));
1413 mze_remove(zap, mze);
1414 }
1415 }
1416 zap_name_free(zn);
1417 return (err);
1418}
1419
1420int
1421zap_remove_norm(objset_t *os, uint64_t zapobj, const char *name,

Callers 2

zap_remove_normFunction · 0.85
zap_remove_by_dnodeFunction · 0.85

Calls 7

zap_name_allocFunction · 0.85
fzap_removeFunction · 0.85
mze_findFunction · 0.85
bzeroFunction · 0.85
zap_m_physFunction · 0.85
mze_removeFunction · 0.85
zap_name_freeFunction · 0.85

Tested by

no test coverage detected