diff options
author | Yu Kuai <yukuai3@huawei.com> | 2024-08-26 10:44:34 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-08-27 20:14:17 +0300 |
commit | 3486015facc030f30d694b92dc18e58073c6c9e0 (patch) | |
tree | 7fdaba0a9ec73e048f2ea73c8fa5eab22050c219 /drivers/md/md-bitmap.h | |
parent | c2257df4108ed872f46c96d6ea6092f17a747632 (diff) | |
download | linux-3486015facc030f30d694b92dc18e58073c6c9e0.tar.xz |
md/md-bitmap: merge md_bitmap_endwrite() 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 change the type
of 'success' and 'behind' from int to bool.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240826074452.1490072-25-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h index 1433d13e447a..056a80ee500f 100644 --- a/drivers/md/md-bitmap.h +++ b/drivers/md/md-bitmap.h @@ -257,6 +257,8 @@ struct bitmap_operations { int (*startwrite)(struct mddev *mddev, sector_t offset, unsigned long sectors, bool behind); + void (*endwrite)(struct mddev *mddev, sector_t offset, + unsigned long sectors, bool success, bool behind); void (*update_sb)(struct bitmap *bitmap); int (*get_stats)(struct bitmap *bitmap, struct md_bitmap_stats *stats); @@ -266,8 +268,6 @@ struct bitmap_operations { void mddev_set_bitmap_ops(struct mddev *mddev); /* these are exported */ -void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, - unsigned long sectors, int success, int behind); int md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded); void md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted); void md_bitmap_close_sync(struct bitmap *bitmap); |