mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
md/md-bitmap: handle the case bitmap is not enabled before end_sync()
This case can be handled without knowing internal implementation. Prepare to introduce CONFIG_MD_BITMAP. Link: https://lore.kernel.org/linux-raid/20250707012711.376844-9-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Xiao Ni <xni@redhat.com>
This commit is contained in:
@@ -3221,15 +3221,13 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
|
||||
|
||||
if (mddev->curr_resync < max_sector) { /* aborted */
|
||||
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery))
|
||||
mddev->bitmap_ops->end_sync(mddev,
|
||||
mddev->curr_resync,
|
||||
&sync_blocks);
|
||||
md_bitmap_end_sync(mddev, mddev->curr_resync,
|
||||
&sync_blocks);
|
||||
else for (i = 0; i < conf->geo.raid_disks; i++) {
|
||||
sector_t sect =
|
||||
raid10_find_virt(conf, mddev->curr_resync, i);
|
||||
|
||||
mddev->bitmap_ops->end_sync(mddev, sect,
|
||||
&sync_blocks);
|
||||
md_bitmap_end_sync(mddev, sect, &sync_blocks);
|
||||
}
|
||||
} else {
|
||||
/* completed sync */
|
||||
|
||||
Reference in New Issue
Block a user