diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-01 16:59:37 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-01 16:59:37 +0000 |
commit | b8b3508c59da5eed15b8db507fd8ef6cc771823f (patch) | |
tree | fafe5f2315c4b30a299bc3b2cf7fe003c867c7ea /tools/lvrename.c | |
parent | 4397ad387e39989701081ab7f66ea35491f350a5 (diff) | |
download | lvm2-b8b3508c59da5eed15b8db507fd8ef6cc771823f.tar.gz |
Convert the straight instances of vg_lock_and_read to new vg_read(_for_update).
Sun May 3 11:40:51 CEST 2009 Petr Rockai <me@mornfall.net>
* Convert the straight instances of vg_lock_and_read to new vg_read(_for_update).
Rebased 6/26/09 by Dave W.
Diffstat (limited to 'tools/lvrename.c')
-rw-r--r-- | tools/lvrename.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/lvrename.c b/tools/lvrename.c index b5d3b3832..53ea1165c 100644 --- a/tools/lvrename.c +++ b/tools/lvrename.c @@ -102,9 +102,8 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv) } log_verbose("Checking for existing volume group \"%s\"", vg_name); - if (!(vg = vg_lock_and_read(cmd, vg_name, NULL, LCK_VG_WRITE, - CLUSTERED | EXPORTED_VG | LVM_WRITE, - CORRECT_INCONSISTENT | FAIL_INCONSISTENT))) + vg = vg_read_for_update(cmd, vg_name, NULL, 0); + if (vg_read_error(vg)) return ECMD_FAILED; if (!(lvl = find_lv_in_vg(vg, lv_name_old))) { |