summaryrefslogtreecommitdiff
path: root/drivers/md/md-bitmap.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-08-29 16:04:23 +0800
committerYu Kuai <yukuai3@huawei.com>2025-09-06 17:20:01 +0800
commita4dd9ba39ba4f86ae8848c63945d443f0569efb1 (patch)
treea45ddbcfab842577c30fe9e9ad4acd516b243fe4 /drivers/md/md-bitmap.h
parentf196d72888640e35002ac3511757cefaa9c5e339 (diff)
md/md-bitmap: add a new method blocks_synced() in bitmap_operations
Currently, raid456 must perform a whole array initial recovery to build initail xor data, then IO to the array won't have to read all the blocks in underlying disks. This behavior will affect IO performance a lot, and nowadays there are huge disks and the initial recovery can take a long time. Hence llbitmap will support lazy initial recovery in following patches. This method is used to check if data blocks is synced or not, if not then IO will still have to read all blocks for raid456. Link: https://lore.kernel.org/linux-raid/20250829080426.1441678-9-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Diffstat (limited to 'drivers/md/md-bitmap.h')
-rw-r--r--drivers/md/md-bitmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
index 95453696c68e..5f41724cbcd8 100644
--- a/drivers/md/md-bitmap.h
+++ b/drivers/md/md-bitmap.h
@@ -90,6 +90,7 @@ struct bitmap_operations {
md_bitmap_fn *end_discard;
sector_t (*skip_sync_blocks)(struct mddev *mddev, sector_t offset);
+ bool (*blocks_synced)(struct mddev *mddev, sector_t offset);
bool (*start_sync)(struct mddev *mddev, sector_t offset,
sector_t *blocks, bool degraded);
void (*end_sync)(struct mddev *mddev, sector_t offset, sector_t *blocks);