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

Function dnode_undirty_dbufs

freebsd/contrib/openzfs/module/zfs/dnode_sync.c:527–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527static void
528dnode_undirty_dbufs(list_t *list)
529{
530 dbuf_dirty_record_t *dr;
531
532 while ((dr = list_head(list))) {
533 dmu_buf_impl_t *db = dr->dr_dbuf;
534 uint64_t txg = dr->dr_txg;
535
536 if (db->db_level != 0)
537 dnode_undirty_dbufs(&dr->dt.di.dr_children);
538
539 mutex_enter(&db->db_mtx);
540 /* XXX - use dbuf_undirty()? */
541 list_remove(list, dr);
542 ASSERT(list_head(&db->db_dirty_records) == dr);
543 list_remove_head(&db->db_dirty_records);
544 ASSERT(list_is_empty(&db->db_dirty_records));
545 db->db_dirtycnt -= 1;
546 if (db->db_level == 0) {
547 ASSERT(db->db_blkid == DMU_BONUS_BLKID ||
548 dr->dt.dl.dr_data == db->db_buf);
549 dbuf_unoverride(dr);
550 } else {
551 mutex_destroy(&dr->dt.di.dr_mtx);
552 list_destroy(&dr->dt.di.dr_children);
553 }
554 kmem_free(dr, sizeof (dbuf_dirty_record_t));
555 dbuf_rele_and_unlock(db, (void *)(uintptr_t)txg, B_FALSE);
556 }
557}
558
559static void
560dnode_sync_free(dnode_t *dn, dmu_tx_t *tx)

Callers 1

dnode_sync_freeFunction · 0.85

Calls 10

mutex_enterFunction · 0.85
dbuf_unoverrideFunction · 0.85
mutex_destroyFunction · 0.85
dbuf_rele_and_unlockFunction · 0.85
list_headFunction · 0.50
list_removeFunction · 0.50
list_remove_headFunction · 0.50
list_is_emptyFunction · 0.50
list_destroyFunction · 0.50
kmem_freeFunction · 0.50

Tested by

no test coverage detected