diff options
author | Yu Kuai <yukuai3@huawei.com> | 2024-08-26 15:44:43 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-08-27 12:43:14 -0700 |
commit | 18db2a9c60aefc61e796f6a384a952999d3b8885 (patch) | |
tree | 2fc73470318ee702b374f7ac552a3a6add44dfd1 /drivers/md/md-bitmap.c | |
parent | 3c9883e77a36ca76b8d92afa99599263ca587ae7 (diff) |
md/md-bitmap: merge md_bitmap_daemon_work() 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-34-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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 4e6e31e364f6..efe928849c94 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -1298,7 +1298,7 @@ out: * bitmap daemon -- periodically wakes up to clean bits and flush pages * out to disk */ -void md_bitmap_daemon_work(struct mddev *mddev) +static void bitmap_daemon_work(struct mddev *mddev) { struct bitmap *bitmap; unsigned long j; @@ -1815,11 +1815,11 @@ static void bitmap_flush(struct mddev *mddev) */ sleep = mddev->bitmap_info.daemon_sleep * 2; bitmap->daemon_lastrun -= sleep; - md_bitmap_daemon_work(mddev); + bitmap_daemon_work(mddev); bitmap->daemon_lastrun -= sleep; - md_bitmap_daemon_work(mddev); + bitmap_daemon_work(mddev); bitmap->daemon_lastrun -= sleep; - md_bitmap_daemon_work(mddev); + bitmap_daemon_work(mddev); if (mddev->bitmap_info.external) md_super_wait(mddev); bitmap_update_sb(bitmap); @@ -2754,6 +2754,7 @@ static struct bitmap_operations bitmap_ops = { .write_all = bitmap_write_all, .dirty_bits = bitmap_dirty_bits, .unplug = bitmap_unplug, + .daemon_work = bitmap_daemon_work, .startwrite = bitmap_startwrite, .endwrite = bitmap_endwrite, |