diff options
| author | Yu Kuai <[email protected]> | 2024-08-26 07:44:33 +0000 |
|---|---|---|
| committer | Song Liu <[email protected]> | 2024-08-27 17:14:17 +0000 |
| commit | c2257df4108ed872f46c96d6ea6092f17a747632 (patch) | |
| tree | 557ae85a96bf32ff8c56794ca623c7174b169181 /drivers/md/raid1.c | |
| parent | md/md-bitmap: merge md_bitmap_dirty_bits() into bitmap_operations (diff) | |
| download | kernel-c2257df4108ed872f46c96d6ea6092f17a747632.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Song Liu <[email protected]>
Diffstat (limited to 'drivers/md/raid1.c')
| -rw-r--r-- | drivers/md/raid1.c | 5 |
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; } |
