* dev-lvmguy-raid-takeover-reshape-resize - adjust __avoid_pvs_with_other_images_of_lv() to upstream
@ 2015-01-31 14:10 Heinz Mauelshagen
0 siblings, 0 replies; only message in thread
From: Heinz Mauelshagen @ 2015-01-31 14:10 UTC (permalink / raw)
To: lvm-devel
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dc8fbe0a7f2832fc57899b4f40cc2f905fe94baa
Commit: dc8fbe0a7f2832fc57899b4f40cc2f905fe94baa
Parent: b8e9454601b32c6689045777db2c605084e27e74
Author: Heinz Mauelshagen <heinzm@redhat.com>
AuthorDate: Thu Jan 22 19:26:52 2015 +0100
Committer: Heinz Mauelshagen <heinzm@redhat.com>
CommitterDate: Thu Jan 22 19:26:52 2015 +0100
adjust __avoid_pvs_with_other_images_of_lv() to upstream
---
lib/metadata/raid_manip.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index e6367c4..220c751 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -2765,7 +2765,7 @@ static int _avoid_pvs_of_lv(struct logical_volume *lv, void *data)
*/
static void __avoid_pvs_with_other_images_of_lv(struct logical_volume *lv, struct dm_list *allocate_pvs)
{
- (void) for_each_sub_lv(lv, _avoid_pvs_of_lv, allocate_pvs);
+ return for_each_sub_lv(lv, _avoid_pvs_of_lv, allocate_pvs);
}
/*
@@ -2874,7 +2874,11 @@ int lv_raid_replace(struct logical_volume *lv,
}
/* Prevent any PVs holding image components from being used for allocation */
- __avoid_pvs_with_other_images_of_lv(lv, allocate_pvs);
+ if (!_avoid_pvs_with_other_images_of_lv(lv, allocate_pvs)) {
+ log_error("Failed to prevent PVs holding image components "
+ "from being used for allocation.");
+ return 0;
+ }
/*
* Allocate the new image components first
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-31 14:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 14:10 dev-lvmguy-raid-takeover-reshape-resize - adjust __avoid_pvs_with_other_images_of_lv() to upstream Heinz Mauelshagen
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.