md/md-bitmap: add md_bitmap_registered/enabled() helper
authorYu Kuai <yukuai3@huawei.com>
Mon, 7 Jul 2025 01:27:02 +0000 (09:27 +0800)
committerYu Kuai <yukuai3@huawei.com>
Sat, 6 Sep 2025 09:11:45 +0000 (17:11 +0800)
commit110332074dc6ad2f07a3cf9cc45b03adbce0e54f
tree26952a934676f9c8660ad81de97fad98efb07f79
parent9c41ead04ec0d3ee54505039879aee20cf495e0a
md/md-bitmap: add md_bitmap_registered/enabled() helper

There are no functional changes, prepare to handle the case that
mddev->bitmap_ops can be NULL, which is possible after introducing
CONFIG_MD_BITMAP.

Link: https://lore.kernel.org/linux-raid/20250707012711.376844-7-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
drivers/md/md-bitmap.c
drivers/md/md-bitmap.h
drivers/md/raid1-10.c