lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2006-06-21 21:38    [W:0.023 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site