diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 03:20:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:34:04 -0500 |
commit | 220946c9018de74b952446e3a4dff1bfd4cbf310 (patch) | |
tree | 8a6a85f23ff3e12ed9c770eb9f2b835125ad5378 /drivers | |
parent | d11c171e636cfd2df818cf3411d88222c2f4fcef (diff) |
[PATCH] md: make sure read error on last working drive of raid1 actually returns failure
We are inadvertently setting the R1BIO_Uptodate bit on read errors when we
decide not to try correcting (because there are no other working devices).
This means that the read error is reported to the client as success.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/raid1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 7fbb60883280..6c10f28bc25e 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -284,7 +284,8 @@ static int raid1_end_read_request(struct bio *bio, unsigned int bytes_done, int | |||
284 | * user-side. So if something waits for IO, then it will | 284 | * user-side. So if something waits for IO, then it will |
285 | * wait for the 'master' bio. | 285 | * wait for the 'master' bio. |
286 | */ | 286 | */ |
287 | set_bit(R1BIO_Uptodate, &r1_bio->state); | 287 | if (uptodate) |
288 | set_bit(R1BIO_Uptodate, &r1_bio->state); | ||
288 | 289 | ||
289 | raid_end_bio_io(r1_bio); | 290 | raid_end_bio_io(r1_bio); |
290 | } else { | 291 | } else { |