diff options
author | Yu Kuai <yukuai3@huawei.com> | 2024-08-26 15:44:46 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-08-27 12:43:15 -0700 |
commit | 57d602414d2e327160f2e03c39eff3f2f895839c (patch) | |
tree | 98595a2b9140854bc2dbc4dee937af0a11f9c81b /drivers/md/md-bitmap.c | |
parent | 77c09640eea56dbfed069ac67b1cd79397d41be8 (diff) | |
download | linux-57d602414d2e327160f2e03c39eff3f2f895839c.tar.gz linux-57d602414d2e327160f2e03c39eff3f2f895839c.tar.bz2 linux-57d602414d2e327160f2e03c39eff3f2f895839c.zip |
md/md-bitmap: merge get_bitmap_from_slot() 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-37-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 0506b54f6322..a75f4216fd40 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2065,7 +2065,7 @@ out: } /* caller need to free returned bitmap with md_bitmap_free() */ -struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot) +static struct bitmap *bitmap_get_from_slot(struct mddev *mddev, int slot) { int rv = 0; struct bitmap *bitmap; @@ -2084,7 +2084,6 @@ struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot) return bitmap; } -EXPORT_SYMBOL(get_bitmap_from_slot); /* Loads the bitmap associated with slot and copies the resync information * to our bitmap @@ -2097,7 +2096,7 @@ int md_bitmap_copy_from_slot(struct mddev *mddev, int slot, struct bitmap_counts *counts; struct bitmap *bitmap; - bitmap = get_bitmap_from_slot(mddev, slot); + bitmap = bitmap_get_from_slot(mddev, slot); if (IS_ERR(bitmap)) { pr_err("%s can't get bitmap from slot %d\n", __func__, slot); return -1; @@ -2782,6 +2781,7 @@ static struct bitmap_operations bitmap_ops = { .get_stats = bitmap_get_stats, .sync_with_cluster = bitmap_sync_with_cluster, + .get_from_slot = bitmap_get_from_slot, }; void mddev_set_bitmap_ops(struct mddev *mddev) |