HomeFreeBSD

Hold db_mtx when updating db_state

Description

Hold db_mtx when updating db_state

Commit 555ef90 did some general code refactoring for
dmu_buf_will_not_fill() and dmu_buf_will_fill(). However, the db_mtx was
not held when update db->db_state in those code block. The rest of the
dbuf code always holds the db_mtx when updating db_state. This is
important because cv_wait() db_changed is used to check for db_state
changes.

Updating dmu_buf_will_not_fill() and dmu_buf_will_fill() to hold the
db_mtx when updating db_state.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #14875

Details

Provenance
Brian Atkinson <batkinson@lanl.gov>Authored on May 19 2023, 8:05 PM
GitHub <noreply@github.com>Committed on May 19 2023, 8:05 PM
Parents
rG577e835f30c9: Probe vdevs before marking removed
Branches
Unknown
Tags
Unknown