Skip to content

Commit 0426e13

Browse files
robnbehlendorf
authored andcommitted
dmu_buf_will_clone: only check that current txg is clean
dbuf_undirty() will (correctly) only removed dirty records for the given (open) txg. If there is a dirty record for an earlier closed txg that has not been synced out yet, then db_dirty_records will still have entries on it, tripping the assertion. Instead, change the assertion to only consider the current txg. To some extent this is redundant, as its really just saying "did dbuf_undirty() work?", but it it doesn't hurt and accurately expresses our expectations. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Kay Pedersen <[email protected]> Signed-off-by: Rob Norris <[email protected]> Original-patch-by: Kay Pedersen <[email protected]> Sponsored-By: OpenDrives Inc. Sponsored-By: Klara Inc. Closes #15050
1 parent 8aa4f0f commit 0426e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/dbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,7 @@ dmu_buf_will_clone(dmu_buf_t *db_fake, dmu_tx_t *tx)
27012701
*/
27022702
mutex_enter(&db->db_mtx);
27032703
VERIFY(!dbuf_undirty(db, tx));
2704-
ASSERT(list_head(&db->db_dirty_records) == NULL);
2704+
ASSERT0(dbuf_find_dirty_eq(db, tx->tx_txg));
27052705
if (db->db_buf != NULL) {
27062706
arc_buf_destroy(db->db_buf, db);
27072707
db->db_buf = NULL;

0 commit comments

Comments
 (0)