summaryrefslogtreecommitdiff
path: root/drivers/md/md-bitmap.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 15:44:32 +0800
committerSong Liu <song@kernel.org>2024-08-27 10:14:17 -0700
commit2d3b130e177f14b461c47880b6e0b338fd6872f5 (patch)
treec6076129bf905a1344f69b32fb722a3657b680a6 /drivers/md/md-bitmap.h
parentb26313cb96f1b3fd6f07d3243f6cd426c5cbaf39 (diff)
downloadlinux-next-2d3b130e177f14b461c47880b6e0b338fd6872f5.tar.gz
linux-next-2d3b130e177f14b461c47880b6e0b338fd6872f5.zip
md/md-bitmap: merge md_bitmap_dirty_bits() 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. Also change the parameter from bitmap to mddev, to avoid access bitmap outside md-bitmap.c as much as possible. And while we're here, also fix coding style for bitmap_store(). Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20240826074452.1490072-23-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.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
index 89cd60a7bb07..875ecbb5b1e4 100644
--- a/drivers/md/md-bitmap.h
+++ b/drivers/md/md-bitmap.h
@@ -252,6 +252,8 @@ struct bitmap_operations {
void (*destroy)(struct mddev *mddev);
void (*flush)(struct mddev *mddev);
void (*write_all)(struct mddev *mddev);
+ void (*dirty_bits)(struct mddev *mddev, unsigned long s,
+ unsigned long e);
void (*update_sb)(struct bitmap *bitmap);
int (*get_stats)(struct bitmap *bitmap, struct md_bitmap_stats *stats);
@@ -260,10 +262,6 @@ struct bitmap_operations {
/* the bitmap API */
void mddev_set_bitmap_ops(struct mddev *mddev);
-/* these are used only by md/bitmap */
-
-void md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e);
-
/* these are exported */
int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset,
unsigned long sectors, int behind);