mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
md/md-llbitmap: don't skip reshape ranges from bitmap state
Reshape progress is tracked by array metadata rather than llbitmap. Do not let llbitmap skip_sync_blocks() suppress reshape ranges based on stale bitmap state before the corresponding checkpoint is persisted. Tested-by: Mykola Marzhan <mykola@meshstor.io> Link: https://patch.msgid.link/20260802195038.164272-21-yukuai@kernel.org Signed-off-by: Yu Kuai <yukuai@fygo.io>
This commit is contained in:
@@ -1707,6 +1707,14 @@ static sector_t llbitmap_skip_sync_blocks(struct mddev *mddev, sector_t offset)
|
||||
return 0;
|
||||
c = llbitmap_read(llbitmap, p);
|
||||
|
||||
/*
|
||||
* Reshape progress is tracked by array metadata rather than llbitmap.
|
||||
* Skipping reshape ranges from stale bitmap state can lose data after a
|
||||
* restart before the corresponding bits are checkpointed to disk.
|
||||
*/
|
||||
if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
|
||||
return 0;
|
||||
|
||||
/* always skip unwritten blocks */
|
||||
if (c == BitUnwritten)
|
||||
return blocks;
|
||||
|
||||
Reference in New Issue
Block a user