summaryrefslogtreecommitdiff
path: root/tools/vgexport.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/vgexport.c
parentb8b3508c59da5eed15b8db507fd8ef6cc771823f (diff)
downloadlvm2-13e8c7e4344ec57917f5c74f9bca071274d235ce.tar.gz
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/vgexport.c')
-rw-r--r--tools/vgexport.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/vgexport.c b/tools/vgexport.c
index fce7e9f5b..59627b971 100644
--- a/tools/vgexport.c
+++ b/tools/vgexport.c
@@ -17,15 +17,14 @@
static int vgexport_single(struct cmd_context *cmd __attribute((unused)),
const char *vg_name,
- struct volume_group *vg, int consistent,
+ struct volume_group *vg,
void *handle __attribute((unused)))
{
struct pv_list *pvl;
struct physical_volume *pv;
- if (!vg_check_status(vg, EXPORTED_VG | LVM_WRITE)) {
+ if (vg_read_error(vg))
goto error;
- }
if (lvs_in_vg_activated(vg)) {
log_error("Volume group \"%s\" has active logical volumes",
@@ -68,7 +67,6 @@ int vgexport(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
- return process_each_vg(cmd, argc, argv, LCK_VG_WRITE,
- VG_INCONSISTENT_ABORT, NULL,
+ return process_each_vg(cmd, argc, argv, READ_FOR_UPDATE, NULL,
&vgexport_single);
}