All of lore.kernel.org
 help / color / mirror / Atom feed
* master - lvchange: missed bits for a8aee7dba2b76
@ 2014-09-24 14:30 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2014-09-24 14:30 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=26dd17f8345f512a48768f7fcf74e0c65558032c
Commit:        26dd17f8345f512a48768f7fcf74e0c65558032c
Parent:        45f57477f46368fbad1864e4606690b274dd2e7d
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Sep 24 16:27:35 2014 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Sep 24 16:30:02 2014 +0200

lvchange: missed bits for a8aee7dba2b76

lv_info is not used here any more.
This code should have been committed with
lv_check_not_in_use API change commit.
---
 tools/lvchange.c |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/tools/lvchange.c b/tools/lvchange.c
index 288b736..7976bf3 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -281,7 +281,6 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)
 	int active = 0;
 	int exclusive = 0;
 	int monitored;
-	struct lvinfo info;
 	struct lv_segment *seg = first_seg(lv);
 	struct dm_list device_list;
 	struct lv_list *lvl;
@@ -311,20 +310,18 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)
 			return 0;
 		}
 
-		if (info.exists) {
-			if (!arg_count(cmd, yes_ARG) &&
-			    yes_no_prompt("Do you really want to deactivate "
-					  "logical volume %s to resync it? [y/n]: ",
-					  lv->name) == 'n') {
-				log_error("Logical volume \"%s\" not resynced",
-					  lv->name);
-				return 0;
-			}
-
-			active = 1;
-			if (lv_is_active_exclusive_locally(lv))
-				exclusive = 1;
+		if (!arg_count(cmd, yes_ARG) &&
+		    yes_no_prompt("Do you really want to deactivate "
+				  "logical volume %s to resync it? [y/n]: ",
+				  lv->name) == 'n') {
+			log_error("Logical volume \"%s\" not resynced",
+				  lv->name);
+			return 0;
 		}
+
+		active = 1;
+		if (lv_is_active_exclusive_locally(lv))
+			exclusive = 1;
 	}
 
 	if (seg_is_raid(seg) && active && !exclusive) {



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-24 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 14:30 master - lvchange: missed bits for a8aee7dba2b76 Zdenek Kabelac

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.