mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
md: add a new mddev field 'bitmap_id'
Prepare to store the bitmap id selected by user, also refactor mddev_set_bitmap_ops a bit in case the value is invalid. Link: https://lore.kernel.org/linux-raid/20250829080426.1441678-5-yukuai1@huaweicloud.com 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>
This commit is contained in:
@@ -40,6 +40,7 @@ enum md_submodule_id {
|
||||
ID_CLUSTER,
|
||||
ID_BITMAP,
|
||||
ID_LLBITMAP, /* TODO */
|
||||
ID_BITMAP_NONE,
|
||||
};
|
||||
|
||||
struct md_submodule_head {
|
||||
@@ -565,6 +566,7 @@ struct mddev {
|
||||
struct percpu_ref writes_pending;
|
||||
int sync_checkers; /* # of threads checking writes_pending */
|
||||
|
||||
enum md_submodule_id bitmap_id;
|
||||
void *bitmap; /* the bitmap for the device */
|
||||
struct bitmap_operations *bitmap_ops;
|
||||
struct {
|
||||
|
||||
Reference in New Issue
Block a user