All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Yasui <tyasui@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] lvm2: sync error handling on secondary mirror in dmeventd
Date: Mon, 30 Nov 2009 14:56:22 -0500	[thread overview]
Message-ID: <4B142366.7050506@redhat.com> (raw)

Set the ME_FAILURE flag if the error is related to sync on the secondary
mirror. A sync error on the secondary mirror occurs by a write I/O and
the error can be treated as the regular write error on mirror legs.


Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
---
 daemons/dmeventd/plugins/mirror/dmeventd_mirror.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: LVM2.02.57-20091125/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
===================================================================
--- LVM2.02.57-20091125.orig/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
+++ LVM2.02.57-20091125/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
@@ -68,10 +68,12 @@ static int _process_status_code(const ch
 		syslog(LOG_ERR, "%s device %s flush failed.\n",
 		       dev_type, dev_name);
 		r = ME_FAILURE;
-	} else if (status_code == 'S')
+	} else if (status_code == 'S') {
 		syslog(LOG_ERR, "%s device %s sync failed.\n",
 		       dev_type, dev_name);
-	else if (status_code == 'R')
+		if (!strcmp(dev_type, "Secondary mirror"))
+			r = ME_FAILURE;
+	} else if (status_code == 'R')
 		syslog(LOG_ERR, "%s device %s read failed.\n",
 		       dev_type, dev_name);
 	else if (status_code != 'A') {



                 reply	other threads:[~2009-11-30 19:56 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=4B142366.7050506@redhat.com \
    --to=tyasui@redhat.com \
    --cc=lvm-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.