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

Function dmu_objset_sync_dnodes

freebsd/contrib/openzfs/module/zfs/dmu_objset.c:1500–1529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498}
1499
1500static void
1501dmu_objset_sync_dnodes(multilist_sublist_t *list, dmu_tx_t *tx)
1502{
1503 dnode_t *dn;
1504
1505 while ((dn = multilist_sublist_head(list)) != NULL) {
1506 ASSERT(dn->dn_object != DMU_META_DNODE_OBJECT);
1507 ASSERT(dn->dn_dbuf->db_data_pending);
1508 /*
1509 * Initialize dn_zio outside dnode_sync() because the
1510 * meta-dnode needs to set it outside dnode_sync().
1511 */
1512 dn->dn_zio = dn->dn_dbuf->db_data_pending->dr_zio;
1513 ASSERT(dn->dn_zio);
1514
1515 ASSERT3U(dn->dn_nlevels, <=, DN_MAX_LEVELS);
1516 multilist_sublist_remove(list, dn);
1517
1518 /*
1519 * See the comment above dnode_rele_task() for an explanation
1520 * of why this dnode hold is always needed (even when not
1521 * doing user accounting).
1522 */
1523 multilist_t *newlist = dn->dn_objset->os_synced_dnodes;
1524 (void) dnode_add_ref(dn, newlist);
1525 multilist_insert(newlist, dn);
1526
1527 dnode_sync(dn, tx);
1528 }
1529}
1530
1531/* ARGSUSED */
1532static void

Callers 1

sync_dnodes_taskFunction · 0.85

Calls 5

multilist_sublist_headFunction · 0.85
multilist_sublist_removeFunction · 0.85
dnode_add_refFunction · 0.85
multilist_insertFunction · 0.85
dnode_syncFunction · 0.85

Tested by

no test coverage detected