summaryrefslogtreecommitdiffstats
path: root/tools/vgremove.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2009-07-01 17:00:50 +0000
committerDave Wysochanski <dwysocha@redhat.com>2009-07-01 17:00:50 +0000
commit13e8c7e4344ec57917f5c74f9bca071274d235ce (patch)
treefa112cef193eb9bd824953b3a504cfcf5ad6b246 /tools/vgremove.c
parentb8b3508c59da5eed15b8db507fd8ef6cc771823f (diff)
downloadlvm2-13e8c7e4344ec57917f5c74f9bca071274d235ce.tar.gz
lvm2-13e8c7e4344ec57917f5c74f9bca071274d235ce.tar.xz
lvm2-13e8c7e4344ec57917f5c74f9bca071274d235ce.zip
Rework the toollib interface (process_each_*) on top of new vg_read.
Sun May 3 12:32:30 CEST 2009 Petr Rockai <me@mornfall.net> * Rework the toollib interface (process_each_*) on top of new vg_read. Rebased 6/26/09 by Dave W. - Add skipping message to process_each_lv - Remove inconsistent_t.
Diffstat (limited to 'tools/vgremove.c')
-rw-r--r--tools/vgremove.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/vgremove.c b/tools/vgremove.c
index e5ad15da..5956075e 100644
--- a/tools/vgremove.c
+++ b/tools/vgremove.c
@@ -16,10 +16,10 @@
#include "tools.h"
static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
- struct volume_group *vg, int consistent,
+ struct volume_group *vg,
void *handle __attribute((unused)))
{
- if (!vg_remove_single(cmd, vg_name, vg, consistent,
+ if (!vg_remove_single(cmd, vg_name, vg,
arg_count(cmd, force_ARG)))
return ECMD_FAILED;
@@ -40,10 +40,8 @@ int vgremove(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
- ret = process_each_vg(cmd, argc, argv, LCK_VG_WRITE,
- arg_count(cmd, force_ARG) ?
- VG_INCONSISTENT_REPAIR :
- VG_INCONSISTENT_ABORT,
+ ret = process_each_vg(cmd, argc, argv,
+ READ_FOR_UPDATE | LOCK_NONBLOCKING,
NULL, &vgremove_single);
unlock_vg(cmd, VG_ORPHANS);