mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Convert dbuf dirty record record list to a list_t
Additionally pull in state machine comments about upcoming async cow work. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <matt@delphix.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9902
This commit is contained in:
@@ -207,10 +207,7 @@ free_verify(dmu_buf_impl_t *db, uint64_t start, uint64_t end, dmu_tx_t *tx)
|
||||
continue;
|
||||
ASSERT(err == 0);
|
||||
ASSERT(child->db_level == 0);
|
||||
dr = child->db_last_dirty;
|
||||
while (dr && dr->dr_txg > txg)
|
||||
dr = dr->dr_next;
|
||||
ASSERT(dr == NULL || dr->dr_txg == txg);
|
||||
dr = dbuf_find_dirty_eq(child, txg);
|
||||
|
||||
/* data_old better be zeroed */
|
||||
if (dr) {
|
||||
@@ -231,7 +228,7 @@ free_verify(dmu_buf_impl_t *db, uint64_t start, uint64_t end, dmu_tx_t *tx)
|
||||
mutex_enter(&child->db_mtx);
|
||||
buf = child->db.db_data;
|
||||
if (buf != NULL && child->db_state != DB_FILL &&
|
||||
child->db_last_dirty == NULL) {
|
||||
list_is_empty(&child->db_dirty_records)) {
|
||||
for (j = 0; j < child->db.db_size >> 3; j++) {
|
||||
if (buf[j] != 0) {
|
||||
panic("freed data not zero: "
|
||||
@@ -541,8 +538,9 @@ dnode_undirty_dbufs(list_t *list)
|
||||
mutex_enter(&db->db_mtx);
|
||||
/* XXX - use dbuf_undirty()? */
|
||||
list_remove(list, dr);
|
||||
ASSERT(db->db_last_dirty == dr);
|
||||
db->db_last_dirty = NULL;
|
||||
ASSERT(list_head(&db->db_dirty_records) == dr);
|
||||
list_remove_head(&db->db_dirty_records);
|
||||
ASSERT(list_is_empty(&db->db_dirty_records));
|
||||
db->db_dirtycnt -= 1;
|
||||
if (db->db_level == 0) {
|
||||
ASSERT(db->db_blkid == DMU_BONUS_BLKID ||
|
||||
|
||||
Reference in New Issue
Block a user