diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-12-10 18:52:02 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-12-10 18:52:02 -0500 |
commit | 64b30c46e866bbff8a9e17883a18636adc358455 (patch) | |
tree | e79ecbec9170dad5704df2ceddda7b65b1e5d1f6 /drivers/md/dm-raid1.c | |
parent | c0da3748b9a894b9f9b561ecc2d090a913988a0f (diff) |
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.c | 6 |
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); | |||
35 | *---------------------------------------------------------------*/ | 35 | *---------------------------------------------------------------*/ |
36 | enum dm_raid1_error { | 36 | enum dm_raid1_error { |
37 | DM_RAID1_WRITE_ERROR, | 37 | DM_RAID1_WRITE_ERROR, |
38 | DM_RAID1_FLUSH_ERROR, | ||
38 | DM_RAID1_SYNC_ERROR, | 39 | DM_RAID1_SYNC_ERROR, |
39 | DM_RAID1_READ_ERROR | 40 | DM_RAID1_READ_ERROR |
40 | }; | 41 | }; |
@@ -264,7 +265,7 @@ static int mirror_flush(struct dm_target *ti) | |||
264 | for (i = 0; i < ms->nr_mirrors; i++) | 265 | for (i = 0; i < ms->nr_mirrors; i++) |
265 | if (test_bit(i, &error_bits)) | 266 | if (test_bit(i, &error_bits)) |
266 | fail_mirror(ms->mirror + i, | 267 | fail_mirror(ms->mirror + i, |
267 | DM_RAID1_WRITE_ERROR); | 268 | DM_RAID1_FLUSH_ERROR); |
268 | return -EIO; | 269 | return -EIO; |
269 | } | 270 | } |
270 | 271 | ||
@@ -1288,7 +1289,8 @@ static char device_status_char(struct mirror *m) | |||
1288 | if (!atomic_read(&(m->error_count))) | 1289 | if (!atomic_read(&(m->error_count))) |
1289 | return 'A'; | 1290 | return 'A'; |
1290 | 1291 | ||
1291 | return (test_bit(DM_RAID1_WRITE_ERROR, &(m->error_type))) ? 'D' : | 1292 | return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' : |
1293 | (test_bit(DM_RAID1_WRITE_ERROR, &(m->error_type))) ? 'D' : | ||
1292 | (test_bit(DM_RAID1_SYNC_ERROR, &(m->error_type))) ? 'S' : | 1294 | (test_bit(DM_RAID1_SYNC_ERROR, &(m->error_type))) ? 'S' : |
1293 | (test_bit(DM_RAID1_READ_ERROR, &(m->error_type))) ? 'R' : 'U'; | 1295 | (test_bit(DM_RAID1_READ_ERROR, &(m->error_type))) ? 'R' : 'U'; |
1294 | } | 1296 | } |