Hi, 在 2024/07/06 22:30, Mateusz Jończyk 写道:
Subject: [RFC PATCH] md/raid1: fill in max_sectors Not yet fully tested or carefully investigated. Signed-off-by: Mateusz Jo艅czyk<mat.jonczyk@xxxxx> --- drivers/md/raid1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 7b8a71ca66dd..82f70a4ce6ed 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -680,6 +680,7 @@ static int choose_slow_rdev(struct r1conf *conf, struct r1bio *r1_bio, len = r1_bio->sectors; read_len = raid1_check_read_range(rdev, this_sector, &len); if (read_len == r1_bio->sectors) { + *max_sectors = read_len; update_read_sectors(conf, disk, this_sector, read_len); return disk; }
This looks correct, can you give it a test and cook a patch? Thanks, Kuai