summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 09:44:33 +0200
committerSong Liu <song@kernel.org>2024-08-27 19:14:17 +0200
commitc2257df4108ed872f46c96d6ea6092f17a747632 (patch)
tree557ae85a96bf32ff8c56794ca623c7174b169181 /drivers/md/raid1.c
parentmd/md-bitmap: merge md_bitmap_dirty_bits() into bitmap_operations (diff)
downloadlinux-c2257df4108ed872f46c96d6ea6092f17a747632.tar.xz
linux-c2257df4108ed872f46c96d6ea6092f17a747632.zip
md/md-bitmap: merge md_bitmap_startwrite() 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 'behind' from int to bool. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20240826074452.1490072-24-yukuai1@huaweicloud.com Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index d490a9ac484f..708687cb28d5 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1604,8 +1604,9 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
stats.behind_writes < max_write_behind)
alloc_behind_master_bio(r1_bio, bio);
- md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
- test_bit(R1BIO_BehindIO, &r1_bio->state));
+ mddev->bitmap_ops->startwrite(
+ mddev, r1_bio->sector, r1_bio->sectors,
+ test_bit(R1BIO_BehindIO, &r1_bio->state));
first_clone = 0;
}