summaryrefslogtreecommitdiff
path: root/drivers/md/md-bitmap.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 10:44:51 +0300
committerSong Liu <song@kernel.org>2024-08-27 22:43:16 +0300
commitdab2ce5534ef7a7b8db70d1abd4225ee8a7798c7 (patch)
treee48e8bd9c15ddbeeb77f53b8945bea18aaf4d0cc /drivers/md/md-bitmap.h
parent49f5f5e309e6127957babed7834f5a0e1022f936 (diff)
downloadlinux-dab2ce5534ef7a7b8db70d1abd4225ee8a7798c7.tar.xz
md/md-bitmap: merge md_bitmap_enabled() 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-42-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.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
index bc9cb4ca676e..c720729687e2 100644
--- a/drivers/md/md-bitmap.h
+++ b/drivers/md/md-bitmap.h
@@ -247,6 +247,7 @@ struct md_bitmap_stats {
};
struct bitmap_operations {
+ bool (*enabled)(struct mddev *mddev);
int (*create)(struct mddev *mddev, int slot);
int (*resize)(struct mddev *mddev, sector_t blocks, int chunksize,
bool init);
@@ -287,12 +288,5 @@ struct bitmap_operations {
/* the bitmap API */
void mddev_set_bitmap_ops(struct mddev *mddev);
-static inline bool md_bitmap_enabled(struct bitmap *bitmap)
-{
- return bitmap && bitmap->storage.filemap &&
- !test_bit(BITMAP_STALE, &bitmap->flags);
-}
-
#endif
-
#endif