md/md-bitmap: delay registration of bitmap_ops until creating bitmap
authorYu Kuai <yukuai3@huawei.com>
Fri, 29 Aug 2025 08:04:21 +0000 (16:04 +0800)
committerYu Kuai <yukuai3@huawei.com>
Sat, 6 Sep 2025 09:19:19 +0000 (17:19 +0800)
commitfb8cc3b0d9db94817a5aae2bcaf78dd079a89e52
treeedef6255f5704cc4b2d3b279be2d2e15aae97c03
parent180b82c1c7b2c2c5bffc1642239bed36d7e83f76
md/md-bitmap: delay registration of bitmap_ops until creating bitmap

Currently bitmap_ops is registered while allocating mddev, this is fine
when there is only one bitmap_ops.

Delay setting bitmap_ops until creating bitmap, so that user can choose
which bitmap to use before running the array.

Link: https://lore.kernel.org/linux-raid/20250721171557.34587-7-yukuai@kernel.org
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Li Nan <linan122@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Documentation/admin-guide/md.rst
drivers/md/md.c