Skip to content

Commit

Permalink
txg_sync should handle write errors in ZIL
Browse files Browse the repository at this point in the history
The txg_sync thread will see certain buffers in a DR_IN_DMU_SYNC state
when ZIL is writing them out. Then it waits until the state changes, but
has an assertion to check that they were not DR_NOT_OVERRIDDEN. If the
data write failed with an error, ZIL will put it into the
DR_NOT_OVERRIDDEN state. It looks like the code will handle that state
without an issue, so we can just delete the assertion.

Sponsored-By: Wasabi Technology, Inc.
Signed-off-by: Richard Yao <richard.yao@klarasystems.com>
  • Loading branch information
Richard Yao committed Dec 12, 2022
1 parent e378571 commit b3580f6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion module/zfs/dbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4439,7 +4439,6 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx)
while (dr->dt.dl.dr_override_state == DR_IN_DMU_SYNC) {
ASSERT(dn->dn_object != DMU_META_DNODE_OBJECT);
cv_wait(&db->db_changed, &db->db_mtx);
ASSERT(dr->dt.dl.dr_override_state != DR_NOT_OVERRIDDEN);
}

/*
Expand Down

0 comments on commit b3580f6

Please sign in to comment.