| 4320 | } |
| 4321 | |
| 4322 | void |
| 4323 | dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx) |
| 4324 | { |
| 4325 | dbuf_dirty_record_t *dr; |
| 4326 | |
| 4327 | while ((dr = list_head(list))) { |
| 4328 | if (dr->dr_zio != NULL) { |
| 4329 | /* |
| 4330 | * If we find an already initialized zio then we |
| 4331 | * are processing the meta-dnode, and we have finished. |
| 4332 | * The dbufs for all dnodes are put back on the list |
| 4333 | * during processing, so that we can zio_wait() |
| 4334 | * these IOs after initiating all child IOs. |
| 4335 | */ |
| 4336 | ASSERT3U(dr->dr_dbuf->db.db_object, ==, |
| 4337 | DMU_META_DNODE_OBJECT); |
| 4338 | break; |
| 4339 | } |
| 4340 | list_remove(list, dr); |
| 4341 | if (dr->dr_dbuf == NULL) { |
| 4342 | dbuf_sync_lightweight(dr, tx); |
| 4343 | } else { |
| 4344 | if (dr->dr_dbuf->db_blkid != DMU_BONUS_BLKID && |
| 4345 | dr->dr_dbuf->db_blkid != DMU_SPILL_BLKID) { |
| 4346 | VERIFY3U(dr->dr_dbuf->db_level, ==, level); |
| 4347 | } |
| 4348 | if (dr->dr_dbuf->db_level > 0) |
| 4349 | dbuf_sync_indirect(dr, tx); |
| 4350 | else |
| 4351 | dbuf_sync_leaf(dr, tx); |
| 4352 | } |
| 4353 | } |
| 4354 | } |
| 4355 | |
| 4356 | /* ARGSUSED */ |
| 4357 | static void |
no test coverage detected