summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-bitmap.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 09:44:40 +0200
committerSong Liu <song@kernel.org>2024-08-27 21:43:14 +0200
commit4338b94271dd8cee8ce3b662b12528cd009325a3 (patch)
tree0e35f1ea77f95bd42eaba31b39ef780006390857 /drivers/md/md-bitmap.c
parentmd/md-bitmap: merge md_bitmap_cond_end_sync() into bitmap_operations (diff)
downloadlinux-4338b94271dd8cee8ce3b662b12528cd009325a3.tar.xz
linux-4338b94271dd8cee8ce3b662b12528cd009325a3.zip
md/md-bitmap: merge md_bitmap_sync_with_cluster() 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-31-yukuai1@huaweicloud.com Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/md-bitmap.c')
-rw-r--r--drivers/md/md-bitmap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 2d9d9689f721..9fe97f14a719 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -1721,9 +1721,9 @@ static void bitmap_cond_end_sync(struct mddev *mddev, sector_t sector,
sysfs_notify_dirent_safe(bitmap->mddev->sysfs_completed);
}
-void md_bitmap_sync_with_cluster(struct mddev *mddev,
- sector_t old_lo, sector_t old_hi,
- sector_t new_lo, sector_t new_hi)
+static void bitmap_sync_with_cluster(struct mddev *mddev,
+ sector_t old_lo, sector_t old_hi,
+ sector_t new_lo, sector_t new_hi)
{
struct bitmap *bitmap = mddev->bitmap;
sector_t sector, blocks = 0;
@@ -1740,7 +1740,6 @@ void md_bitmap_sync_with_cluster(struct mddev *mddev,
}
WARN((blocks > new_hi) && old_hi, "alignment is not correct for hi\n");
}
-EXPORT_SYMBOL(md_bitmap_sync_with_cluster);
static void md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
{
@@ -2753,6 +2752,8 @@ static struct bitmap_operations bitmap_ops = {
.update_sb = bitmap_update_sb,
.get_stats = bitmap_get_stats,
+
+ .sync_with_cluster = bitmap_sync_with_cluster,
};
void mddev_set_bitmap_ops(struct mddev *mddev)