From ce503f59ae899c3e75a8a1cf46f2d44c0c5b5c7c Mon Sep 17 00:00:00 2001 From: Jonathan Brassow Date: Mon, 26 Jun 2006 00:27:30 -0700 Subject: [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 Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/kcopyd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/md/kcopyd.c') diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index 72480a48d88..73ab875fb15 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -314,7 +314,7 @@ static void complete_io(unsigned long error, void *context) 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_err, 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. -- cgit v1.2.3