summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-12-10 23:52:02 +0000
committerAlasdair G Kergon <agk@redhat.com>2009-12-10 23:52:02 +0000
commit64b30c46e866bbff8a9e17883a18636adc358455 (patch)
treee79ecbec9170dad5704df2ceddda7b65b1e5d1f6 /drivers/md/dm-raid1.c
parentc0da3748b9a894b9f9b561ecc2d090a913988a0f (diff)
downloadblackbird-op-linux-64b30c46e866bbff8a9e17883a18636adc358455.tar.gz
blackbird-op-linux-64b30c46e866bbff8a9e17883a18636adc358455.zip
dm raid1: report flush errors separately in status
Report flush errors as 'F' instead of 'D' for log and mirror devices. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r--drivers/md/dm-raid1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 751660b0c574..85c8704c67bb 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -35,6 +35,7 @@ static DECLARE_WAIT_QUEUE_HEAD(_kmirrord_recovery_stopped);
*---------------------------------------------------------------*/
enum dm_raid1_error {
DM_RAID1_WRITE_ERROR,
+ DM_RAID1_FLUSH_ERROR,
DM_RAID1_SYNC_ERROR,
DM_RAID1_READ_ERROR
};
@@ -264,7 +265,7 @@ static int mirror_flush(struct dm_target *ti)
for (i = 0; i < ms->nr_mirrors; i++)
if (test_bit(i, &error_bits))
fail_mirror(ms->mirror + i,
- DM_RAID1_WRITE_ERROR);
+ DM_RAID1_FLUSH_ERROR);
return -EIO;
}
@@ -1288,7 +1289,8 @@ static char device_status_char(struct mirror *m)
if (!atomic_read(&(m->error_count)))
return 'A';
- return (test_bit(DM_RAID1_WRITE_ERROR, &(m->error_type))) ? 'D' :
+ return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' :
+ (test_bit(DM_RAID1_WRITE_ERROR, &(m->error_type))) ? 'D' :
(test_bit(DM_RAID1_SYNC_ERROR, &(m->error_type))) ? 'S' :
(test_bit(DM_RAID1_READ_ERROR, &(m->error_type))) ? 'R' : 'U';
}
OpenPOWER on IntegriCloud