From: Jonathan E Brassow <jbrassow@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Kergon Alasdair <agk@redhat.com>
Subject: mirroring: [patch 3 of 8] device failure tolerance
Date: Wed, 29 Jun 2005 13:19:36 -0500 [thread overview]
Message-ID: <81dff920a130cbb1abecd2352d0daddd@redhat.com> (raw)
This patch changes the status info returned from the log and the mirror
code so that they display whether a device is dead (D) or alive (A).
This is needed in order for the user-land programs to be able to
determine which device is bad in the event of a failure.
brassow
diff -urN linux-2.6.12-003/drivers/md/dm-log.c
linux-2.6.12-004/drivers/md/dm-log.c
--- linux-2.6.12-003/drivers/md/dm-log.c 2005-06-28 16:02:39.071277119
-0500
+++ linux-2.6.12-004/drivers/md/dm-log.c 2005-06-28 16:40:49.157122050
-0500
@@ -679,12 +679,22 @@
switch(status) {
case STATUSTYPE_INFO:
+ format_dev_t(buffer, lc->log_dev->bdev->bd_dev);
+ DMEMIT("%s %u %s%s %u ",
+ log->type->name,
+ lc->sync == DEFAULTSYNC ? 2 : 3,
+ buffer,
+ lc->log_dev_failed ? "/D" : "/A",
+ lc->region_size);
+ DMEMIT_SYNC;
break;
case STATUSTYPE_TABLE:
format_dev_t(buffer, lc->log_dev->bdev->bd_dev);
- DMEMIT("%s %u %s %u ", log->type->name,
- lc->sync == DEFAULTSYNC ? 2 : 3, buffer,
+ DMEMIT("%s %u %s %u ",
+ log->type->name,
+ lc->sync == DEFAULTSYNC ? 2 : 3,
+ buffer,
lc->region_size);
DMEMIT_SYNC;
}
diff -urN linux-2.6.12-003/drivers/md/dm-raid1.c
linux-2.6.12-004/drivers/md/dm-raid1.c
--- linux-2.6.12-003/drivers/md/dm-raid1.c 2005-06-28
16:02:33.953912094 -0500
+++ linux-2.6.12-004/drivers/md/dm-raid1.c 2005-06-28
16:46:37.167943233 -0500
@@ -1204,8 +1204,11 @@
switch (type) {
case STATUSTYPE_INFO:
DMEMIT("%d ", ms->nr_mirrors);
- for (m = 0; m < ms->nr_mirrors; m++)
- DMEMIT("%s ", ms->mirror[m].dev->name);
+ for (m = 0; m < ms->nr_mirrors; m++) {
+ DMEMIT("%s/%s ", ms->mirror[m].dev->name,
+ atomic_read(&(ms->mirror[m].error_count)) ?
+ "D" : "A");
+ }
DMEMIT(SECTOR_FORMAT "/" SECTOR_FORMAT,
ms->rh.log->type->get_sync_count(ms->rh.log),
reply other threads:[~2005-06-29 18:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81dff920a130cbb1abecd2352d0daddd@redhat.com \
--to=jbrassow@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.