[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] vg_read: port process_each_pv, obliterate lockingfailed() ...



Hi,

I have rebased further 4 patches from the old vg_read series. These should be
the last ones, and we went through them with Alasdair in Berlin. Basically,
just a quick glance should be fine, we have already agreed that they do the
right thing. The test-suite still passes as well.

They are mostly straight rebase, I still have to change a few names in them
(boottime locking, now if I could recall what name we agreed on in Berlin...).

Yours,
   Petr.

Mon Jul 13 14:46:14 CEST 2009  Petr Rockai <me mornfall net>
  * Remove lockingfailed().
  
  We provide a lock type that behaves like no_locking, but is not
  clustered. Moreover, it also forbids any write locks. This magically (and
  consistently) prevents use of clustered VGs, or changing local VGs with
  --ignorelockingfailure. As a bonus, we can remove the special hacks in a few
  places. Of course, people looking for trouble can always set their locking_type
  to 0 to override.
diff -rN -u -p old-lvmlib-09-07-13/lib/locking/locking.c new-lvmlib-09-07-13/lib/locking/locking.c
--- old-lvmlib-09-07-13/lib/locking/locking.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/lib/locking/locking.c	2009-07-14 14:55:57.000000000 +0200
@@ -213,8 +213,6 @@ static void _update_vg_lock_count(uint32
  */
 int init_locking(int type, struct cmd_context *cmd)
 {
-	init_lockingfailed(0);
-
 	if (type < 0)
 		type = find_config_tree_int(cmd, "global/locking_type", 1);
 		
@@ -277,9 +275,7 @@ int init_locking(int type, struct cmd_co
 
 	/* FIXME Ensure only read ops are permitted */
 	log_verbose("Locking disabled - only read operations permitted.");
-
-	init_no_locking(&_locking, cmd);
-	init_lockingfailed(1);
+	init_boottime_locking(&_locking, cmd);
 
 	return 1;
 }
diff -rN -u -p old-lvmlib-09-07-13/lib/locking/locking_types.h new-lvmlib-09-07-13/lib/locking/locking_types.h
--- old-lvmlib-09-07-13/lib/locking/locking_types.h	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/lib/locking/locking_types.h	2009-07-14 14:55:57.000000000 +0200
@@ -40,6 +40,8 @@ struct locking_type {
  */
 int init_no_locking(struct locking_type *locking, struct cmd_context *cmd);
 
+int init_boottime_locking(struct locking_type *locking, struct cmd_context *cmd);
+
 int init_file_locking(struct locking_type *locking, struct cmd_context *cmd);
 
 int init_external_locking(struct locking_type *locking, struct cmd_context *cmd);
diff -rN -u -p old-lvmlib-09-07-13/lib/locking/no_locking.c new-lvmlib-09-07-13/lib/locking/no_locking.c
--- old-lvmlib-09-07-13/lib/locking/no_locking.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/lib/locking/no_locking.c	2009-07-14 14:55:57.000000000 +0200
@@ -66,6 +66,17 @@ static int _no_lock_resource(struct cmd_
 	return 1;
 }
 
+static int _boottime_lock_resource(struct cmd_context *cmd,
+				   const char *resource,
+				   uint32_t flags)
+{
+	if (flags & LCK_TYPE_MASK == LCK_WRITE) {
+		log_error("Write locks are prohibited with --ignorelockingfailure.");
+		return 0;
+	}
+	return _no_lock_resource(cmd, resource, flags);
+}
+
 int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused)))
 {
 	locking->lock_resource = _no_lock_resource;
@@ -75,3 +86,13 @@ int init_no_locking(struct locking_type 
 
 	return 1;
 }
+
+int init_boottime_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused)))
+{
+	locking->lock_resource = _boottime_lock_resource;
+	locking->reset_locking = _no_reset_locking;
+	locking->fin_locking = _no_fin_locking;
+	locking->flags = 0;
+
+	return 1;
+}
diff -rN -u -p old-lvmlib-09-07-13/lib/metadata/metadata.c new-lvmlib-09-07-13/lib/metadata/metadata.c
--- old-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:55:57.000000000 +0200
@@ -2693,8 +2693,7 @@ static uint32_t _vg_bad_status_bits(cons
 	uint32_t failure = 0;
 
 	if ((status & CLUSTERED) &&
-	    (vg_is_clustered(vg)) && !locking_is_clustered() &&
-	    !lockingfailed()) {
+	    (vg_is_clustered(vg)) && !locking_is_clustered()) {
 		log_error("Skipping clustered volume group %s", vg->name);
 		/* Return because other flags are considered undefined. */
 		return FAILED_CLUSTERED;
@@ -2843,8 +2842,7 @@ static vg_t *_vg_lock_and_read(struct cm
 		goto_bad;
 	}
 
-	if (vg_is_clustered(vg) && !locking_is_clustered() &&
-	    !lockingfailed()) {
+	if (vg_is_clustered(vg) && !locking_is_clustered()) {
 		log_error("Skipping clustered volume group %s", vg->name);
 		failure |= FAILED_CLUSTERED;
 		goto_bad;
diff -rN -u -p old-lvmlib-09-07-13/lib/misc/lvm-globals.c new-lvmlib-09-07-13/lib/misc/lvm-globals.c
--- old-lvmlib-09-07-13/lib/misc/lvm-globals.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/lib/misc/lvm-globals.c	2009-07-14 14:55:57.000000000 +0200
@@ -31,7 +31,6 @@ static int _trust_cache = 0; /* Don't sc
 static int _debug_level = 0;
 static int _log_cmd_name = 0;
 static int _ignorelockingfailure = 0;
-static int _lockingfailed = 0;
 static int _security_level = SECURITY_LEVEL;
 static char _cmd_name[30] = "";
 static int _mirror_in_sync = 0;
@@ -77,11 +76,6 @@ void init_ignorelockingfailure(int level
 	_ignorelockingfailure = level;
 }
 
-void init_lockingfailed(int level)
-{
-	_lockingfailed = level;
-}
-
 void init_security_level(int level)
 {
 	_security_level = level;
@@ -161,11 +155,6 @@ int trust_cache()
 	return _trust_cache;
 }
 
-int lockingfailed()
-{
-	return _lockingfailed;
-}
-
 int ignorelockingfailure()
 {
 	return _ignorelockingfailure;
diff -rN -u -p old-lvmlib-09-07-13/tools/lvchange.c new-lvmlib-09-07-13/tools/lvchange.c
--- old-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:55:57.000000000 +0200
@@ -119,12 +119,6 @@ static int lvchange_availability(struct 
 		if (!deactivate_lv(cmd, lv))
 			return_0;
 	} else {
-		if (lockingfailed() && (vg_is_clustered(lv->vg))) {
-			log_verbose("Locking failed: ignoring clustered "
-				    "logical volume %s", lv->name);
-			return 0;
-		}
-
 		if (lv_is_origin(lv) || (activate == CHANGE_AE)) {
 			log_verbose("Activating logical volume \"%s\" "
 				    "exclusively", lv->name);
diff -rN -u -p old-lvmlib-09-07-13/tools/vgchange.c new-lvmlib-09-07-13/tools/vgchange.c
--- old-lvmlib-09-07-13/tools/vgchange.c	2009-07-14 14:55:57.000000000 +0200
+++ new-lvmlib-09-07-13/tools/vgchange.c	2009-07-14 14:55:57.000000000 +0200
@@ -138,14 +138,8 @@ static int _vgchange_available(struct cm
 		return ECMD_FAILED;
 	}
 
-	if (activate && lockingfailed() && (vg_is_clustered(vg))) {
-		log_error("Locking inactive: ignoring clustered "
-			  "volume group %s", vg->name);
-		return ECMD_FAILED;
-	}
-
 	/* FIXME Move into library where clvmd can use it */
-	if (activate && !lockingfailed())
+	if (activate)
 		check_current_backup(vg);
 
 	if (activate && (active = lvs_in_vg_activated(vg))) {
Mon Jul 13 16:00:48 CEST 2009  Petr Rockai <me mornfall net>
  * Port process_each_pv to new vg_read.
diff -rN -u -p old-lvmlib-09-07-13/lib/metadata/metadata.c new-lvmlib-09-07-13/lib/metadata/metadata.c
--- old-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:55:49.000000000 +0200
@@ -2818,7 +2818,8 @@ static vg_t *_vg_lock_and_read(struct cm
 	lock_name = is_orphan_vg(vg_name) ? VG_ORPHANS : vg_name;
 	already_locked = vgname_is_locked(lock_name);
 
-	if (!already_locked && !lock_vol(cmd, lock_name, lock_flags)) {
+	if (!already_locked && !(misc_flags & DISABLE_LOCKING) &&
+	    !lock_vol(cmd, lock_name, lock_flags)) {
 		log_error("Can't get lock for %s", vg_name);
 		return _vg_make_handle(cmd, vg, FAILED_LOCKING);
 	}
@@ -2866,7 +2867,7 @@ static vg_t *_vg_lock_and_read(struct cm
 	return _vg_make_handle(cmd, vg, failure);
 
 bad:
-	if (!already_locked)
+	if (!already_locked && !(misc_flags & DISABLE_LOCKING))
 		unlock_vg(cmd, lock_name);
 
 	return _vg_make_handle(cmd, vg, failure);
diff -rN -u -p old-lvmlib-09-07-13/lib/metadata/metadata-exported.h new-lvmlib-09-07-13/lib/metadata/metadata-exported.h
--- old-lvmlib-09-07-13/lib/metadata/metadata-exported.h	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/lib/metadata/metadata-exported.h	2009-07-14 14:55:49.000000000 +0200
@@ -105,6 +105,7 @@ struct pv_segment;
 #define READ_ALLOW_INCONSISTENT	0x00010000U
 #define READ_ALLOW_EXPORTED	0x00020000U
 #define READ_REQUIRE_RESIZEABLE	0x00040000U
+#define DISABLE_LOCKING         0x00080000U
 
 /* A meta-flag, useful with toollib for_each_* functions. */
 #define READ_FOR_UPDATE 	0x00100000U
diff -rN -u -p old-lvmlib-09-07-13/tools/pvdisplay.c new-lvmlib-09-07-13/tools/pvdisplay.c
--- old-lvmlib-09-07-13/tools/pvdisplay.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/tools/pvdisplay.c	2009-07-14 14:55:49.000000000 +0200
@@ -113,6 +113,6 @@ int pvdisplay(struct cmd_context *cmd, i
 		return EINVALID_CMD_LINE;
 	}
 
-	return process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ, 0, NULL,
+	return process_each_pv(cmd, argc, argv, NULL, 0, 0, NULL,
 			       _pvdisplay_single);
 }
diff -rN -u -p old-lvmlib-09-07-13/tools/pvresize.c new-lvmlib-09-07-13/tools/pvresize.c
--- old-lvmlib-09-07-13/tools/pvresize.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/tools/pvresize.c	2009-07-14 14:55:49.000000000 +0200
@@ -205,7 +205,7 @@ int pvresize(struct cmd_context *cmd, in
 	params.done = 0;
 	params.total = 0;
 
-	ret = process_each_pv(cmd, argc, argv, NULL, LCK_VG_WRITE, 0, &params,
+	ret = process_each_pv(cmd, argc, argv, NULL, READ_FOR_UPDATE, 0, &params,
 			      _pvresize_single);
 
 	log_print("%d physical volume(s) resized / %d physical volume(s) "
diff -rN -u -p old-lvmlib-09-07-13/tools/reporter.c new-lvmlib-09-07-13/tools/reporter.c
--- old-lvmlib-09-07-13/tools/reporter.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/tools/reporter.c	2009-07-14 14:55:49.000000000 +0200
@@ -378,12 +378,12 @@ static int _report(struct cmd_context *c
 				    report_handle, &_vgs_single);
 		break;
 	case LABEL:
-		r = process_each_pv(cmd, argc, argv, NULL, LCK_NONE,
+		r = process_each_pv(cmd, argc, argv, NULL, DISABLE_LOCKING,
 				    1, report_handle, &_label_single);
 		break;
 	case PVS:
 		if (args_are_pvs)
-			r = process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ,
+			r = process_each_pv(cmd, argc, argv, NULL, 0,
 					    0, report_handle, &_pvs_single);
 		else
 			r = process_each_vg(cmd, argc, argv, 0,
@@ -395,7 +395,7 @@ static int _report(struct cmd_context *c
 		break;
 	case PVSEGS:
 		if (args_are_pvs)
-			r = process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ,
+			r = process_each_pv(cmd, argc, argv, NULL, 0,
 					    0, report_handle, &_pvsegs_single);
 		else
 			r = process_each_vg(cmd, argc, argv, 0,
diff -rN -u -p old-lvmlib-09-07-13/tools/toollib.c new-lvmlib-09-07-13/tools/toollib.c
--- old-lvmlib-09-07-13/tools/toollib.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/tools/toollib.c	2009-07-14 14:55:49.000000000 +0200
@@ -612,7 +612,7 @@ static int _process_all_devs(struct cmd_
  * This can pause alongide pvscan or vgscan process for a while.
  */
 int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
-		    struct volume_group *vg, uint32_t lock_type,
+		    struct volume_group *vg, uint32_t flags,
 		    int scan_label_only, void *handle,
 		    int (*process_single) (struct cmd_context * cmd,
 					   struct volume_group * vg,
@@ -622,7 +622,7 @@ int process_each_pv(struct cmd_context *
 	int opt = 0;
 	int ret_max = ECMD_PROCESSED;
 	int ret = 0;
-	int lock_global = lock_type == LCK_VG_READ;
+	int lock_global = !(flags & DISABLE_LOCKING) && !(flags & READ_FOR_UPDATE);
 
 	struct pv_list *pvl;
 	struct physical_volume *pv;
@@ -630,12 +630,11 @@ int process_each_pv(struct cmd_context *
 	struct dm_list tags;
 	struct str_list *sll;
 	char *tagname;
-	int consistent = 1;
 	int scanned = 0;
 
 	dm_list_init(&tags);
 
-	if (lock_global && !lock_vol(cmd, VG_GLOBAL, lock_type)) {
+	if (lock_global && !lock_vol(cmd, VG_GLOBAL, LCK_READ)) {
 		log_error("Unable to obtain global lock.");
 		return ECMD_FAILED;
 	}
@@ -716,26 +715,11 @@ int process_each_pv(struct cmd_context *
 		if (!dm_list_empty(&tags) && (vgnames = get_vgnames(cmd, 0)) &&
 			   !dm_list_empty(vgnames)) {
 			dm_list_iterate_items(sll, vgnames) {
-				if (!lock_vol(cmd, sll->str, lock_type)) {
-					log_error("Can't lock %s: skipping", sll->str);
+				vg = vg_read(cmd, sll->str, NULL, flags);
+				if (vg_read_error(vg)) {
 					ret_max = ECMD_FAILED;
 					continue;
 				}
-				if (!(vg = vg_read_internal(cmd, sll->str, NULL, &consistent))) {
-					log_error("Volume group \"%s\" not found", sll->str);
-					unlock_vg(cmd, sll->str);
-					ret_max = ECMD_FAILED;
-					continue;
-				}
-				if (!consistent) {
-					unlock_and_release_vg(cmd, vg, sll->str);
-					continue;
-				}
-
-				if (!vg_check_status(vg, CLUSTERED)) {
-					unlock_and_release_vg(cmd, vg, sll->str);
-					continue;
-				}
 
 				ret = process_each_pv_in_vg(cmd, vg, &tags,
 							    handle,
diff -rN -u -p old-lvmlib-09-07-13/tools/vgreduce.c new-lvmlib-09-07-13/tools/vgreduce.c
--- old-lvmlib-09-07-13/tools/vgreduce.c	2009-07-14 14:55:48.000000000 +0200
+++ new-lvmlib-09-07-13/tools/vgreduce.c	2009-07-14 14:55:49.000000000 +0200
@@ -571,7 +571,7 @@ int vgreduce(struct cmd_context *cmd, in
 
 		/* FIXME: Pass private struct through to all these functions */
 		/* and update in batch here? */
-		ret = process_each_pv(cmd, argc, argv, vg, LCK_NONE, 0, NULL,
+		ret = process_each_pv(cmd, argc, argv, vg, READ_FOR_UPDATE, 0, NULL,
 				      _vgreduce_single);
 
 	}
Tue Jul 14 14:53:49 CEST 2009  Petr Rockai <me mornfall net>
  * Refuse to open VG with MISSING_PVs for update unless handles_missing_pvs is set.
diff -rN -u -p old-lvmlib-09-07-13/lib/metadata/metadata.c new-lvmlib-09-07-13/lib/metadata/metadata.c
--- old-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/lib/metadata/metadata.c	2009-07-14 14:56:06.000000000 +0200
@@ -2860,6 +2860,14 @@ static vg_t *_vg_lock_and_read(struct cm
 		}
 	}
 
+	if (!cmd->handles_missing_pvs && vg_missing_pv_count(vg) &&
+	    (lock_flags & LCK_WRITE)) {
+		log_error("Cannot change VG %s while PVs are missing!",
+			  vg->name);
+		failure |= FAILED_INCONSISTENT; /* FIXME new failure code here? */
+		goto_bad;
+	}
+
 	failure |= _vg_bad_status_bits(vg, status_flags);
 	if (failure)
 		goto_bad;
diff -rN -u -p old-lvmlib-09-07-13/test/t-partial-activate.sh new-lvmlib-09-07-13/test/t-partial-activate.sh
--- old-lvmlib-09-07-13/test/t-partial-activate.sh	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/test/t-partial-activate.sh	2009-07-14 14:56:07.000000000 +0200
@@ -9,3 +9,7 @@ disable_dev $dev1
 not vgreduce --removemissing $vg
 not lvchange -v -a y $vg/mirror
 lvchange -v --partial -a y $vg/mirror
+
+# also check that vgchange works
+vgchange -a n --partial $vg
+vgchange -a y --partial $vg
diff -rN -u -p old-lvmlib-09-07-13/tools/lvchange.c new-lvmlib-09-07-13/tools/lvchange.c
--- old-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:56:07.000000000 +0200
@@ -690,15 +690,21 @@ int lvchange(struct cmd_context *cmd, in
 		return EINVALID_CMD_LINE;
 	}
 
-	if (arg_count(cmd, ignorelockingfailure_ARG) &&
-	    (arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
+	int avail_only =
+	    !(arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
 	     arg_count(cmd, readahead_ARG) || arg_count(cmd, persistent_ARG) ||
 	     arg_count(cmd, addtag_ARG) || arg_count(cmd, deltag_ARG) ||
-	     arg_count(cmd, refresh_ARG) || arg_count(cmd, alloc_ARG))) {
+	     arg_count(cmd, refresh_ARG) || arg_count(cmd, alloc_ARG) ||
+	     arg_count(cmd, resync_ARG));
+
+	if (arg_count(cmd, ignorelockingfailure_ARG) && !avail_only) {
 		log_error("Only -a permitted with --ignorelockingfailure");
 		return EINVALID_CMD_LINE;
 	}
 
+	if (avail_only)
+		cmd->handles_missing_pvs = 1;
+
 	if (!argc) {
 		log_error("Please give logical volume path(s)");
 		return EINVALID_CMD_LINE;
@@ -720,6 +726,7 @@ int lvchange(struct cmd_context *cmd, in
 		return EINVALID_CMD_LINE;
 	}
 
-	return process_each_lv(cmd, argc, argv, READ_FOR_UPDATE, NULL,
+	return process_each_lv(cmd, argc, argv,
+			       avail_only ? 0 : READ_FOR_UPDATE, NULL,
 			       &lvchange_single);
 }
diff -rN -u -p old-lvmlib-09-07-13/tools/lvconvert.c new-lvmlib-09-07-13/tools/lvconvert.c
--- old-lvmlib-09-07-13/tools/lvconvert.c	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/tools/lvconvert.c	2009-07-14 14:56:07.000000000 +0200
@@ -929,8 +929,10 @@ int lvconvert(struct cmd_context * cmd, 
 		return EINVALID_CMD_LINE;
 	}
 
-	if (arg_count(cmd, repair_ARG))
+	if (arg_count(cmd, repair_ARG)) {
 		init_ignore_suspended_devices(1);
+		cmd->handles_missing_pvs = 1;
+	}
 
 	log_verbose("Checking for existing volume group \"%s\"", lp.vg_name);
 
diff -rN -u -p old-lvmlib-09-07-13/tools/vgchange.c new-lvmlib-09-07-13/tools/vgchange.c
--- old-lvmlib-09-07-13/tools/vgchange.c	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/tools/vgchange.c	2009-07-14 14:56:07.000000000 +0200
@@ -126,6 +126,12 @@ static int _vgchange_available(struct cm
 	int available;
 	int activate = 1;
 
+	/*
+	 * Safe, since we never write out new metadata here. Required for
+	 * partial activation to work.
+	 */
+	cmd->handles_missing_pvs = 1;
+
 	available = arg_uint_value(cmd, available_ARG, 0);
 
 	if ((available == CHANGE_AN) || (available == CHANGE_ALN))
diff -rN -u -p old-lvmlib-09-07-13/tools/vgreduce.c new-lvmlib-09-07-13/tools/vgreduce.c
--- old-lvmlib-09-07-13/tools/vgreduce.c	2009-07-14 14:56:06.000000000 +0200
+++ new-lvmlib-09-07-13/tools/vgreduce.c	2009-07-14 14:56:07.000000000 +0200
@@ -510,8 +510,10 @@ int vgreduce(struct cmd_context *cmd, in
 
 	log_verbose("Finding volume group \"%s\"", vg_name);
 
-	if (repairing)
+	if (repairing) {
 		init_ignore_suspended_devices(1);
+		cmd->handles_missing_pvs = 1;
+	}
 
 	vg = vg_read_for_update(cmd, vg_name, NULL, READ_ALLOW_EXPORTED);
 	if (vg_read_error(vg) == FAILED_ALLOCATION ||
Tue Jul 14 14:53:56 CEST 2009  Petr Rockai <me mornfall net>
  * Take just a read lock when activating in lvchange.
diff -rN -u -p old-lvmlib-09-07-13/tools/lvchange.c new-lvmlib-09-07-13/tools/lvchange.c
--- old-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:56:18.000000000 +0200
+++ new-lvmlib-09-07-13/tools/lvchange.c	2009-07-14 14:56:18.000000000 +0200
@@ -726,7 +726,6 @@ int lvchange(struct cmd_context *cmd, in
 		return EINVALID_CMD_LINE;
 	}
 
-	return process_each_lv(cmd, argc, argv,
-			       avail_only ? 0 : READ_FOR_UPDATE, NULL,
+	return process_each_lv(cmd, argc, argv, READ_FOR_UPDATE, NULL,
 			       &lvchange_single);
 }

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]