From 96d0004d12eef62a3b7d64a6ae2d02be84a885f8 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Fri, 26 Jun 2009 09:47:36 +0000 Subject: 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 * Convert the straight instances of vg_lock_and_read to new vg_read(_for_update). Author: Petr Rockai Committer: Dave Wysochanski --- tools/pvchange.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/pvchange.c') diff --git a/tools/pvchange.c b/tools/pvchange.c index 98fe2f27..1c9d3944 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -57,9 +57,8 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv, log_verbose("Finding volume group %s of physical volume %s", vg_name, pv_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_0; if (!(pvl = find_pv_in_vg(vg, pv_name))) { -- cgit