Skip to content

Commit cc396d2

Browse files
committed
Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.14
* 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid10: properly indicate failure when ending a failed write request
2 parents 402e0b8 + 5ba0393 commit cc396d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/md/raid1.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,6 @@ static void raid1_end_write_request(struct bio *bio)
474474
/*
475475
* When the device is faulty, it is not necessary to
476476
* handle write error.
477-
* For failfast, this is the only remaining device,
478-
* We need to retry the write without FailFast.
479477
*/
480478
if (!test_bit(Faulty, &rdev->flags))
481479
set_bit(R1BIO_WriteError, &r1_bio->state);

drivers/md/raid10.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ static void raid10_end_write_request(struct bio *bio)
471471
/*
472472
* When the device is faulty, it is not necessary to
473473
* handle write error.
474-
* For failfast, this is the only remaining device,
475-
* We need to retry the write without FailFast.
476474
*/
477475
if (!test_bit(Faulty, &rdev->flags))
478476
set_bit(R10BIO_WriteError, &r10_bio->state);
479477
else {
478+
/* Fail the request */
479+
set_bit(R10BIO_Degraded, &r10_bio->state);
480480
r10_bio->devs[slot].bio = NULL;
481481
to_put = bio;
482482
dec_rdev = 1;

0 commit comments

Comments
 (0)