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

Function dnode_free_interior_slots

freebsd/contrib/openzfs/module/zfs/dnode.c:1148–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1146}
1147
1148void
1149dnode_free_interior_slots(dnode_t *dn)
1150{
1151 dnode_children_t *children = dmu_buf_get_user(&dn->dn_dbuf->db);
1152 int epb = dn->dn_dbuf->db.db_size >> DNODE_SHIFT;
1153 int idx = (dn->dn_object & (epb - 1)) + 1;
1154 int slots = dn->dn_num_slots - 1;
1155
1156 if (slots == 0)
1157 return;
1158
1159 ASSERT3S(idx + slots, <=, DNODES_PER_BLOCK);
1160
1161 while (!dnode_slots_tryenter(children, idx, slots)) {
1162 DNODE_STAT_BUMP(dnode_free_interior_lock_retry);
1163 cond_resched();
1164 }
1165
1166 dnode_set_slots(children, idx, slots, DN_SLOT_FREE);
1167 dnode_slots_rele(children, idx, slots);
1168}
1169
1170void
1171dnode_special_close(dnode_handle_t *dnh)

Callers 2

dnode_reallocateFunction · 0.85
dnode_sync_freeFunction · 0.85

Calls 4

dmu_buf_get_userFunction · 0.85
dnode_slots_tryenterFunction · 0.85
dnode_set_slotsFunction · 0.85
dnode_slots_releFunction · 0.85

Tested by

no test coverage detected