diff options
| author | Yu Kuai <yukuai@fygo.io> | 2026-08-03 03:50:15 +0800 |
|---|---|---|
| committer | Yu Kuai <yukuai@fygo.io> | 2026-08-07 14:43:34 +0800 |
| commit | 2a79365b2278f16e163e4024086105693b421601 (patch) | |
| tree | 725ada1a3e6868f1a5ddfaf155ef17ce2c31d374 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 17ea021ae74987d6064c8195c4922fa025753892 (diff) | |
md: wait for behind writes before destroying bitmap
__md_stop() destroyed the bitmap before calling mddev_detach(). That made
mddev_detach() skip bitmap_ops->wait_behind_writes(), because the bitmap
was already disconnected from mddev.
This was still safe for the legacy bitmap because bitmap_destroy() waits
for behind writes itself. llbitmap keeps that wait in its
->wait_behind_writes() operation instead, while ->destroy() tears down the
llbitmap storage. With the old ordering, RAID1 behind-write completions
could still run after llbitmap storage had been freed.
Call mddev_detach() before md_bitmap_destroy() so the common detach path
can wait for behind writes while the bitmap is still alive. Only destroy
the bitmap after those users are gone.
Fixes: 5ab829f1971d ("md/md-llbitmap: introduce new lockless bitmap")
Tested-by: Mykola Marzhan <mykola@meshstor.io>
Link: https://patch.msgid.link/20260802195038.164272-7-yukuai@kernel.org
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
