All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Brassow <jbrassow@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 13 of 13] LVM: 2 mirrored log monitor fixes
Date: Wed, 17 Feb 2010 11:57:49 -0600	[thread overview]
Message-ID: <201002171757.o1HHvnpB005275@hydrogen.msp.redhat.com> (raw)

Patch name: lvm2-mirrored-log-monitor-fixes.patch

If an event is received on a mirrored LV which also happens to
be the log of a mirror, strip off the '_mlog' component extension
of the name and pass the encapsulating LV to 'lvconvert --repair'.


Index: LVM2/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
===================================================================
--- LVM2.orig/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
+++ LVM2/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
@@ -148,6 +148,11 @@ static int _remove_failed_devices(const 
 		return -ENOMEM;	/* FIXME Replace with generic error return - reason for failure has already got logged */
 	}
 
+	/* strip off the mirror component designations */
+	layer = strstr(lv, "_mlog");
+	if (layer)
+		layer = '\0';
+
 	/* FIXME Is any sanity-checking required on %s? */
 	if (CMD_SIZE <= snprintf(cmd_str, CMD_SIZE, "lvconvert --config devices{ignore_suspended_devices=1} --repair --use-policies %s/%s", vg, lv)) {
 		/* this error should be caught above, but doesn't hurt to check again */



             reply	other threads:[~2010-02-17 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 17:57 Jonathan Brassow [this message]
2010-02-17 23:20 ` [PATCH 13 of 13] LVM: 2 mirrored log monitor fixes Takahiro Yasui
2010-02-18 15:26   ` Jonathan Brassow

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=201002171757.o1HHvnpB005275@hydrogen.msp.redhat.com \
    --to=jbrassow@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.