All of lore.kernel.org
 help / color / mirror / Atom feed
From: Malahal Naineni <malahal@us.ibm.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Monitor log volume if it is a mirror
Date: Mon, 01 Feb 2010 16:00:18 -0800	[thread overview]
Message-ID: <a40ce4ac6ed447ed3e5f.1265068818@localhost> (raw)

Log volume of a mirror can also be a mirror with the following patchset.
http://thread.gmane.org/gmane.linux.kernel.device-mapper.devel/10232
If so, monitor such log volumes.

Signed-off-by: Malahal Naineni (malahal at us.ibm.com)

diff -r 15e7d25bb86a -r a40ce4ac6ed4 lib/activate/activate.c
--- a/lib/activate/activate.c	Mon Feb 01 15:50:20 2010 -0800
+++ b/lib/activate/activate.c	Mon Feb 01 15:54:59 2010 -0800
@@ -737,6 +737,7 @@ int monitor_dev_for_events(struct cmd_co
 	int r = 1;
 	struct dm_list *tmp, *snh, *snht;
 	struct lv_segment *seg;
+	struct lv_segment *log_seg;
 	int (*monitor_fn) (struct lv_segment *s, int e);
 	uint32_t s;
 
@@ -772,6 +773,16 @@ int monitor_dev_for_events(struct cmd_co
 		return r;
 	}
 
+	/*
+	 * If the volume is mirrored and its log is also mirrored, monitor
+	 * the log volume as well.
+	 */
+	if ((seg = first_seg(lv)) != NULL && seg->log_lv != NULL &&
+	    (log_seg = first_seg(seg->log_lv)) != NULL &&
+	    seg_is_mirrored(log_seg))
+		if (!monitor_dev_for_events(cmd, seg->log_lv, monitor))
+			r = 0;
+
 	dm_list_iterate(tmp, &lv->segments) {
 		seg = dm_list_item(tmp, struct lv_segment);
 



                 reply	other threads:[~2010-02-02  0:00 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=a40ce4ac6ed447ed3e5f.1265068818@localhost \
    --to=malahal@us.ibm.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.