diff options
author | Paul Dagnelie <[email protected]> | 2024-01-29 10:36:42 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-29 10:36:42 -0800 |
commit | 8161b73272decee7c63d38a4a3993a316bad5947 (patch) | |
tree | 2912fb816f21efb72102c9471c4a152259873c91 /RELEASES.md | |
parent | 401c3563d4dc1f2d98ab493591c5a74109c6e72d (diff) |
Don't assert mg_initialized due to device addition race
During device removal stress tests, we noticed that we were tripping
the assertion that mg_initialized was true. After investigation, it was
determined that the mg in question was the embedded log metaslab
group for a newly added vdev; the normal mg had been initialized (by
metaslab_sync_reassess, via vdev_sync_done). However, because the spa
config alloc lock is not held as writer across both calls to
metaslab_sync_reassess, it is possible for an allocation to happen
between the two metaslab_groups being initialized. Because the metaslab
code doesn't check the group in question, just the vdev's main mg, it
is possible to get past the initial check in vdev_allocatable and
later fail due to the assertion.
We simply remove the assertions. We could also consider locking the
ALLOC lock around the reassess calls in vdev_sync_done, but that risks
deadlocks. We could check the actual target mg in vdev_allocatable,
but that risks racing with a passivation that comes in after that
check but before the assertion. We still won't be able to actually
allocate from the metaslab group if no metaslabs are ready, so this
change shouldn't break anything.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Wilson <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #15818
Diffstat (limited to 'RELEASES.md')
0 files changed, 0 insertions, 0 deletions