dev-lvmguy-raid-takeover-reshape-resize - adjust __avoid_pvs_with_other_images_of_lv() to upstream
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dc8fbe0a7f2832fc57899b4f40cc2f905fe94baa Commit: dc8fbe0a7f2832fc57899b4f40cc2f905fe94baa Parent: b8e9454601b32c6689045777db2c605084e27e74 Author: Heinz Mauelshagen <[email protected]> AuthorDate: Thu Jan 22 19:26:52 2015 +0100 Committer: Heinz Mauelshagen <[email protected]> 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(-)
lib/metadata/raid_manip.c +6 -2
@@ -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