HomeFreeBSD

dmu_buf_will_clone: only check that current txg is clean

Description

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 <behlendorf1@llnl.gov>
Reviewed-by: Kay Pedersen <mail@mkwg.de>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Original-patch-by: Kay Pedersen <mail@mkwg.de>
Sponsored-By: OpenDrives Inc.
Sponsored-By: Klara Inc.
Closes #15050

Details

Provenance
rob.norris_klarasystems.comAuthored on Jul 24 2023, 7:54 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 24 2023, 11:35 PM
Parents
rG87a6e135c5f5: brt_vdev_realloc: use vmem_alloc for large allocation
Branches
Unknown
Tags
Unknown