summaryrefslogtreecommitdiffstats
path: root/tools/vgcfgrestore.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2009-05-13 13:02:52 +0000
committerDave Wysochanski <dwysocha@redhat.com>2009-05-13 13:02:52 +0000
commit5a820745ce09adb0388a44e972ca909810fa03e8 (patch)
tree7e75de983fd790f476948adf7a4cd55e60d67c32 /tools/vgcfgrestore.c
parentb44e3bdc86e8891be7bf651cc8dd7840c7d78ca5 (diff)
downloadlvm2-5a820745ce09adb0388a44e972ca909810fa03e8.tar.gz
lvm2-5a820745ce09adb0388a44e972ca909810fa03e8.tar.xz
lvm2-5a820745ce09adb0388a44e972ca909810fa03e8.zip
Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.
As a simplification to the tools and further liblvm, this patch pushes the setting of NON_BLOCKING lock flag inside the lock_vol() call. The policy we set is if any existing VGs are currently locked, we set the NON_BLOCKING flag. Should be no functional change.
Diffstat (limited to 'tools/vgcfgrestore.c')
-rw-r--r--tools/vgcfgrestore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/vgcfgrestore.c b/tools/vgcfgrestore.c
index 3c66b62b..6ec20d16 100644
--- a/tools/vgcfgrestore.c
+++ b/tools/vgcfgrestore.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -48,7 +48,7 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
- if (!lock_vol(cmd, vg_name, LCK_VG_WRITE | LCK_NONBLOCK)) {
+ if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) {
log_error("Unable to lock volume group %s", vg_name);
unlock_vg(cmd, VG_ORPHANS);
return ECMD_FAILED;