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

Function dnode_special_close

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

Source from the content-addressed store, hash-verified

1168}
1169
1170void
1171dnode_special_close(dnode_handle_t *dnh)
1172{
1173 dnode_t *dn = dnh->dnh_dnode;
1174
1175 /*
1176 * Ensure dnode_rele_and_unlock() has released dn_mtx, after final
1177 * zfs_refcount_remove()
1178 */
1179 mutex_enter(&dn->dn_mtx);
1180 if (zfs_refcount_count(&dn->dn_holds) > 0)
1181 cv_wait(&dn->dn_nodnholds, &dn->dn_mtx);
1182 mutex_exit(&dn->dn_mtx);
1183 ASSERT3U(zfs_refcount_count(&dn->dn_holds), ==, 0);
1184
1185 ASSERT(dn->dn_dbuf == NULL ||
1186 dmu_buf_get_user(&dn->dn_dbuf->db) == NULL);
1187 zrl_add(&dnh->dnh_zrlock);
1188 dnode_destroy(dn); /* implicit zrl_remove() */
1189 zrl_destroy(&dnh->dnh_zrlock);
1190 dnh->dnh_dnode = NULL;
1191}
1192
1193void
1194dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object,

Callers 1

dmu_objset_evict_doneFunction · 0.85

Calls 7

mutex_enterFunction · 0.85
zfs_refcount_countFunction · 0.85
cv_waitFunction · 0.85
mutex_exitFunction · 0.85
dmu_buf_get_userFunction · 0.85
dnode_destroyFunction · 0.85
zrl_destroyFunction · 0.85

Tested by

no test coverage detected