Commit 7e4c47c7 authored by Yu Kuai's avatar Yu Kuai Committed by Wentao Guan
Browse files

md: add a new callback pers->bitmap_sector()

stable inclusion
from stable-v6.6.79
commit 14bc83e97fbdd4262a71ab6df3ccd584f1c4d756
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBXANC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=14bc83e97fbdd4262a71ab6df3ccd584f1c4d756



--------------------------------

commit 0c984a283a3ea3f10bebecd6c57c1d41b2e4f518 upstream.

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

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarXiao Ni <xni@redhat.com>
Link: https://lore.kernel.org/r/20250109015145.158868-4-yukuai1@huaweicloud.com


Signed-off-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 14bc83e97fbdd4262a71ab6df3ccd584f1c4d756)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent b5ff2686
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -634,6 +634,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 {