summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-bitmap.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 09:44:45 +0200
committerSong Liu <song@kernel.org>2024-08-27 21:43:15 +0200
commit77c09640eea56dbfed069ac67b1cd79397d41be8 (patch)
tree34997c22e09c8d4837339fd95eb1df162ef6cb27 /drivers/md/md-bitmap.h
parentmd/md-bitmap: pass in mddev directly for md_bitmap_resize() (diff)
downloadlinux-77c09640eea56dbfed069ac67b1cd79397d41be8.tar.xz
linux-77c09640eea56dbfed069ac67b1cd79397d41be8.zip
md/md-bitmap: merge md_bitmap_resize() into bitmap_operations
So that the implementation won't be exposed, and it'll be possible to invent a new bitmap by replacing bitmap_operations. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20240826074452.1490072-36-yukuai1@huaweicloud.com Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/md-bitmap.h')
-rw-r--r--drivers/md/md-bitmap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
index 4610e50548eb..d05fc2f1451e 100644
--- a/drivers/md/md-bitmap.h
+++ b/drivers/md/md-bitmap.h
@@ -248,6 +248,9 @@ struct md_bitmap_stats {
struct bitmap_operations {
int (*create)(struct mddev *mddev, int slot);
+ int (*resize)(struct mddev *mddev, sector_t blocks, int chunksize,
+ bool init);
+
int (*load)(struct mddev *mddev);
void (*destroy)(struct mddev *mddev);
void (*flush)(struct mddev *mddev);
@@ -280,8 +283,6 @@ void mddev_set_bitmap_ops(struct mddev *mddev);
/* these are exported */
-int md_bitmap_resize(struct mddev *mddev, sector_t blocks, int chunksize,
- bool init);
struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot);
int md_bitmap_copy_from_slot(struct mddev *mddev, int slot,
sector_t *lo, sector_t *hi, bool clear_bits);