Skip to content

Commit 743bf03

Browse files
committed
Merge tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.17
Pull MD fixes from Yu: "- fix data loss for writemostly in raid1, by Yu Kuai; - fix potentional data lost by skipping recovery, by Li Nan;" * tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md: prevent incorrect update of resync/recovery offset md/raid1: fix data lost for writemostly rdev
2 parents 1f6b281 + 7202082 commit 743bf03

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/md/md.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9125,6 +9125,11 @@ void md_do_sync(struct md_thread *thread)
91259125
}
91269126

91279127
action = md_sync_action(mddev);
9128+
if (action == ACTION_FROZEN || action == ACTION_IDLE) {
9129+
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
9130+
goto skip;
9131+
}
9132+
91289133
desc = md_sync_action_name(action);
91299134
mddev->last_sync_action = action;
91309135

drivers/md/raid1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio,
12251225
int i = 0;
12261226
struct bio *behind_bio = NULL;
12271227

1228-
behind_bio = bio_alloc_bioset(NULL, vcnt, 0, GFP_NOIO,
1228+
behind_bio = bio_alloc_bioset(NULL, vcnt, bio->bi_opf, GFP_NOIO,
12291229
&r1_bio->mddev->bio_set);
12301230

12311231
/* discard op, we don't support writezero/writesame yet */

0 commit comments

Comments
 (0)