All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan E Brassow <jbrassow@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Kergon Alasdair <agk@redhat.com>
Subject: mirroring: [patch 5 of 6] device failure tolerance
Date: Thu, 30 Jun 2005 03:00:45 -0500	[thread overview]
Message-ID: <d459df3fa77e2c972d837f613a137de5@redhat.com> (raw)

This patch changes the status output.  It will break pvmove and other 
things that may have been parsing the status output of a mirror.  It is 
necessary, however, if we are going to have a way to determine which 
device in a mirror failed - or distinguish an failure event from one 
that may simply signal the device is in-sync.  Right now, different 
logs may output different arguments (device and failure, region size, 
sync/nosync, etc), which may make it difficult to parse.  I wondered 
about just having the log type and device with liveness status.  
However, this would still have variable arguments between core and disk 
- or some future scheme that may use multiple log devices for 
redundancy.

  brassow

diff -urN linux-2.6.12-00004/drivers/md/dm-log.c 
linux-2.6.12-00005/drivers/md/dm-log.c
--- linux-2.6.12-00004/drivers/md/dm-log.c	2005-06-30 
01:44:58.277954335 -0500
+++ linux-2.6.12-00005/drivers/md/dm-log.c	2005-06-30 
02:06:43.632391301 -0500
@@ -717,6 +717,9 @@

  	switch(status) {
  	case STATUSTYPE_INFO:
+		DMEMIT("%s %u %u ", log->type->name,
+		       lc->sync == DEFAULTSYNC ? 1 : 2, lc->region_size);
+		DMEMIT_SYNC;
  		break;

  	case STATUSTYPE_TABLE:
@@ -737,6 +740,14 @@

  	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:
diff -urN linux-2.6.12-00004/drivers/md/dm-raid1.c 
linux-2.6.12-00005/drivers/md/dm-raid1.c
--- linux-2.6.12-00004/drivers/md/dm-raid1.c	2005-06-30 
01:56:19.457727576 -0500
+++ linux-2.6.12-00005/drivers/md/dm-raid1.c	2005-06-30 
01:56:27.164784984 -0500
@@ -1546,8 +1546,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-30  8:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30  8:00 Jonathan E Brassow [this message]
2005-06-30 16:38 ` mirroring: [patch 5 of 6] device failure tolerance Kevin Corry
2005-06-30 17:56   ` Alasdair G Kergon
2005-06-30 18:00     ` Kevin Corry
2005-06-30 18:10     ` Jonathan E Brassow
2005-06-30 18:58       ` Alasdair G Kergon
2005-06-30 19:05       ` Jonathan E Brassow
2005-06-30 19:51         ` Alasdair G Kergon

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=d459df3fa77e2c972d837f613a137de5@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.