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

Function dbuf_sync_bonus

freebsd/contrib/openzfs/module/zfs/dbuf.c:3895–3915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3893}
3894
3895static void
3896dbuf_sync_bonus(dbuf_dirty_record_t *dr, dmu_tx_t *tx)
3897{
3898 dmu_buf_impl_t *db = dr->dr_dbuf;
3899 void *data = dr->dt.dl.dr_data;
3900
3901 ASSERT0(db->db_level);
3902 ASSERT(MUTEX_HELD(&db->db_mtx));
3903 ASSERT(db->db_blkid == DMU_BONUS_BLKID);
3904 ASSERT(data != NULL);
3905
3906 dnode_t *dn = dr->dr_dnode;
3907 ASSERT3U(DN_MAX_BONUS_LEN(dn->dn_phys), <=,
3908 DN_SLOTS_TO_BONUSLEN(dn->dn_phys->dn_extra_slots + 1));
3909 bcopy(data, DN_BONUS(dn->dn_phys), DN_MAX_BONUS_LEN(dn->dn_phys));
3910
3911 dbuf_sync_leaf_verify_bonus_dnode(dr);
3912
3913 dbuf_undirty_bonus(dr);
3914 dbuf_rele_and_unlock(db, (void *)(uintptr_t)tx->tx_txg, B_FALSE);
3915}
3916
3917/*
3918 * When syncing out a blocks of dnodes, adjust the block to deal with

Callers 1

dbuf_sync_leafFunction · 0.85

Calls 3

dbuf_undirty_bonusFunction · 0.85
dbuf_rele_and_unlockFunction · 0.85

Tested by

no test coverage detected