From 679f3db7adead81f6e7874d424c9fb7d00f6c699 Mon Sep 17 00:00:00 2001 From: Yu Kuai Date: Thu, 9 Jan 2025 09:51:43 +0800 Subject: [PATCH] md: add a new callback pers->bitmap_sector() BugLink: https://bugs.launchpad.net/bugs/2111953 commit 0c984a283a3ea3f10bebecd6c57c1d41b2e4f518 upstream. This callback will be used in raid5 to convert io ranges from array to bitmap. Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni Link: https://lore.kernel.org/r/20250109015145.158868-4-yukuai1@huaweicloud.com Signed-off-by: Song Liu Signed-off-by: Yu Kuai Signed-off-by: Greg Kroah-Hartman Signed-off-by: Manuel Diewald Signed-off-by: Mehmet Basaran --- drivers/md/md.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/md.h b/drivers/md/md.h index 0f8efdd1924b..c30040df7765 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -667,6 +667,9 @@ struct md_personality void *(*takeover) (struct mddev *mddev); /* Changes the consistency policy of an active array. */ int (*change_consistency_policy)(struct mddev *mddev, const char *buf); + /* convert io ranges from array to bitmap */ + void (*bitmap_sector)(struct mddev *mddev, sector_t *offset, + unsigned long *sectors); }; struct md_sysfs_entry {