diff options
author | Yu Kuai <yukuai3@huawei.com> | 2024-08-26 15:44:37 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-08-27 10:14:17 -0700 |
commit | 1415f402e1a1e6054377ed15f249589204cfb8b7 (patch) | |
tree | 9594279d34e61638875b01aea010cd9bdb7b0fe3 /drivers/md/md-bitmap.c | |
parent | 9be669bd1b031f40b35034223517cf886e7a7fcc (diff) |
md/md-bitmap: merge md_bitmap_end_sync() 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.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240826074452.1490072-28-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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 7e810fc2852e..8aef907da158 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -1665,12 +1665,11 @@ static void __bitmap_end_sync(struct bitmap *bitmap, sector_t offset, spin_unlock_irqrestore(&bitmap->counts.lock, flags); } -void md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, - sector_t *blocks) +static void bitmap_end_sync(struct mddev *mddev, sector_t offset, + sector_t *blocks) { - __bitmap_end_sync(bitmap, offset, blocks, true); + __bitmap_end_sync(mddev->bitmap, offset, blocks, true); } -EXPORT_SYMBOL(md_bitmap_end_sync); void md_bitmap_close_sync(struct bitmap *bitmap) { @@ -2745,6 +2744,7 @@ static struct bitmap_operations bitmap_ops = { .startwrite = bitmap_startwrite, .endwrite = bitmap_endwrite, .start_sync = bitmap_start_sync, + .end_sync = bitmap_end_sync, .update_sb = bitmap_update_sb, .get_stats = bitmap_get_stats, |