]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
md: add a new callback pers->bitmap_sector()
authorYu Kuai <yukuai3@huawei.com>
Thu, 9 Jan 2025 01:51:43 +0000 (09:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:19 +0000 (10:02 +0100)
commit 0c984a283a3ea3f10bebecd6c57c1d41b2e4f518 upstream.

This callback will be used in raid5 to convert io ranges from array to
bitmap.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Link: https://lore.kernel.org/r/20250109015145.158868-4-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Yu Kuai <yukuai1@huaweicloud.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.h

index 4ba93af36126dddc71575ebb3e80cbba8ca2dbcd..de6dadb9a40b064b324ff80e9dc93856d9fc0ceb 100644 (file)
@@ -746,6 +746,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 {