From: Heinz Mauelshagen <mauelsha@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - lvchange: allow a transiently failed RaidLV to be refreshed
Date: Mon, 12 Dec 2016 21:10:04 +0000 (UTC) [thread overview]
Message-ID: <20161212211004.DDDE860D79@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=87117c2b2546231c789f92c75590f053a8fb987c
Commit: 87117c2b2546231c789f92c75590f053a8fb987c
Parent: 75ec7c8deeed95f005d78b4b962f70f783f7f0a0
Author: Heinz Mauelshagen <heinzm@redhat.com>
AuthorDate: Mon Dec 12 22:06:17 2016 +0100
Committer: Heinz Mauelshagen <heinzm@redhat.com>
CommitterDate: Mon Dec 12 22:08:47 2016 +0100
lvchange: allow a transiently failed RaidLV to be refreshed
Enhance commit 0b8bf73a63d8 to refresh the top-level LV correctly
in case of a clustered, remotely activated RaidLV.
Related: rhbz1399844
---
lib/metadata/lv_manip.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 120217f..fdfee36 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -1417,17 +1417,23 @@ int lv_refresh_suspend_resume(const struct logical_volume *lv)
* with transient failures of SubLVs.
*/
if (lv_is_raid(lv)) {
- uint32_t s;
- struct lv_segment *seg = first_seg(lv);
-
- for (s = 0; s < seg->area_count; s++) {
- if (seg_type(seg, s) == AREA_LV &&
- !_lv_refresh_suspend_resume(seg_lv(seg, s)))
- return 0;
- if (seg->meta_areas &&
- seg_metatype(seg, s) == AREA_LV &&
- !_lv_refresh_suspend_resume(seg_metalv(seg, s)))
+ if (vg_is_clustered(lv->vg) &&
+ lv_is_active_remotely(lv)) {
+ if (!_lv_refresh_suspend_resume(lv))
return 0;
+ } else {
+ uint32_t s;
+ struct lv_segment *seg = first_seg(lv);
+
+ for (s = 0; s < seg->area_count; s++) {
+ if (seg_type(seg, s) == AREA_LV &&
+ !_lv_refresh_suspend_resume(seg_lv(seg, s)))
+ return 0;
+ if (seg->meta_areas &&
+ seg_metatype(seg, s) == AREA_LV &&
+ !_lv_refresh_suspend_resume(seg_metalv(seg, s)))
+ return 0;
+ }
}
}
next reply other threads:[~2016-12-12 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 21:10 Heinz Mauelshagen [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-23 2:41 master - lvchange: allow a transiently failed RaidLV to be refreshed Heinz Mauelshagen
2016-11-30 21:58 Heinz Mauelshagen
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=20161212211004.DDDE860D79@fedorahosted.org \
--to=mauelsha@fedoraproject.org \
--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.