summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-bitmap.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 09:44:44 +0200
committerSong Liu <song@kernel.org>2024-08-27 21:43:15 +0200
commite1791dae6cbd65e5102dca40b8adadef1d89c1b9 (patch)
treeeac6979de71f17227293294a49bd1e0fb9dd0e39 /drivers/md/md-bitmap.h
parentmd/md-bitmap: merge md_bitmap_daemon_work() into bitmap_operations (diff)
downloadlinux-e1791dae6cbd65e5102dca40b8adadef1d89c1b9.tar.xz
linux-e1791dae6cbd65e5102dca40b8adadef1d89c1b9.zip
md/md-bitmap: pass in mddev directly for md_bitmap_resize()
And move the condition "if (mddev->bitmap)" into md_bitmap_resize() as well, on the one hand make code cleaner, on the other hand try not to access bitmap directly. Since we are here, also change the parameter 'init' from int to bool. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20240826074452.1490072-35-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
index 065b36c0c43a..4610e50548eb 100644
--- a/drivers/md/md-bitmap.h
+++ b/drivers/md/md-bitmap.h
@@ -280,8 +280,8 @@ void mddev_set_bitmap_ops(struct mddev *mddev);
/* these are exported */
-int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
- int chunksize, int init);
+int md_bitmap_resize(struct mddev *mddev, sector_t blocks, int chunksize,
+ bool init);
struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot);
int md_bitmap_copy_from_slot(struct mddev *mddev, int slot,
sector_t *lo, sector_t *hi, bool clear_bits);