]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] md: make sure read error on last working drive of raid1 actually returns...
authorNeilBrown <neilb@suse.de>
Fri, 6 Jan 2006 08:20:27 +0000 (00:20 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:34:04 +0000 (08:34 -0800)
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>
drivers/md/raid1.c

index 7fbb60883280842d8b31ab954df878e5c0aae36c..6c10f28bc25e15ffcf1b8b357f35f524c5cf7eb0 100644 (file)
@@ -284,7 +284,8 @@ static int raid1_end_read_request(struct bio *bio, unsigned int bytes_done, int
                 * user-side. So if something waits for IO, then it will
                 * wait for the 'master' bio.
                 */
-               set_bit(R1BIO_Uptodate, &r1_bio->state);
+               if (uptodate)
+                       set_bit(R1BIO_Uptodate, &r1_bio->state);
 
                raid_end_bio_io(r1_bio);
        } else {