1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Fix a pvs error path.

This commit is contained in:
Alasdair Kergon 2004-05-24 14:14:10 +00:00
parent 3bc930ea7b
commit 4bbd3acb4e
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.00.16 -
=============================
Fix a pvs error path.
xxchange -ae for exclusive activation.
Don't return non-zero status if there aren't any volume groups.
Add --alloc argument to tools.

View File

@ -58,11 +58,13 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
struct physical_volume *pv, void *handle)
{
int consistent = 0;
int ret = ECMD_PROCESSED;
if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) {
log_error("Can't lock %s: skipping", pv->vg_name);
return ECMD_FAILED;
}
if (!(vg = vg_read(cmd, pv->vg_name, &consistent))) {
log_error("Can't read %s: skipping", pv->vg_name);
unlock_vg(cmd, pv->vg_name);
@ -70,11 +72,10 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
}
if (!report_object(handle, vg, NULL, pv, NULL))
return ECMD_FAILED;
ret = ECMD_FAILED;
unlock_vg(cmd, pv->vg_name);
return ECMD_PROCESSED;
return ret;
}
static int _report(struct cmd_context *cmd, int argc, char **argv,