aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/kcopyd.c
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2006-06-26 03:27:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:35 -0400
commitce503f59ae899c3e75a8a1cf46f2d44c0c5b5c7c (patch)
tree7bec805d077c3a7f47f7a1965a1a8020082c5544 /drivers/md/kcopyd.c
parent8a835f11bce68ed990533e49b5dedb00bee46d71 (diff)
[PATCH] dm kcopyd: error accumulation fix
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/kcopyd.c')
-rw-r--r--drivers/md/kcopyd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index 72480a48d88b..73ab875fb158 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -314,7 +314,7 @@ static void complete_io(unsigned long error, void *context)
314 314
315 if (error) { 315 if (error) {
316 if (job->rw == WRITE) 316 if (job->rw == WRITE)
317 job->write_err &= error; 317 job->write_err |= error;
318 else 318 else
319 job->read_err = 1; 319 job->read_err = 1;
320 320
@@ -460,7 +460,7 @@ static void segment_complete(int read_err,
460 job->read_err = 1; 460 job->read_err = 1;
461 461
462 if (write_err) 462 if (write_err)
463 job->write_err &= write_err; 463 job->write_err |= write_err;
464 464
465 /* 465 /*
466 * Only dispatch more work if there hasn't been an error. 466 * Only dispatch more work if there hasn't been an error.