Messages in this thread Patch in this message | | | Date | Wed, 21 Jun 2006 20:35:54 +0100 | From | Alasdair G Kergon <> | Subject | [PATCH 09/15] dm kcopyd: error accumulation fix |
| |
From: Jonathan Brassow <jbrassow@redhat.com>
kcopyd should accumulate errors - otherwise I/O failures may be ignored unintentionally.
And invert 'success' (used in a future patch), using a more intuitive !(read_err || write_err).
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Index: linux-2.6.17/drivers/md/kcopyd.c =================================================================== --- linux-2.6.17.orig/drivers/md/kcopyd.c 2006-06-21 16:19:34.000000000 +0100 +++ linux-2.6.17/drivers/md/kcopyd.c 2006-06-21 17:17:57.000000000 +0100 @@ -314,7 +314,7 @@ static void complete_io(unsigned long er if (error) { if (job->rw == WRITE) - job->write_err &= error; + job->write_err |= error; else job->read_err = 1; @@ -460,7 +460,7 @@ static void segment_complete(int read_er job->read_err = 1; if (write_err) - job->write_err &= write_err; + job->write_err |= write_err; /* * Only dispatch more work if there hasn't been an error. Index: linux-2.6.17/drivers/md/dm-raid1.c =================================================================== --- linux-2.6.17.orig/drivers/md/dm-raid1.c 2006-06-21 17:17:49.000000000 +0100 +++ linux-2.6.17/drivers/md/dm-raid1.c 2006-06-21 17:17:57.000000000 +0100 @@ -604,7 +604,7 @@ static void recovery_complete(int read_e struct region *reg = (struct region *) context; /* FIXME: better error handling */ - rh_recovery_end(reg, read_err || write_err); + rh_recovery_end(reg, !(read_err || write_err)); } static int recover(struct mirror_set *ms, struct region *reg) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |