mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Fix a pvs error path.
This commit is contained in:
parent
36cfd88743
commit
199fa12a3b
@ -1,5 +1,6 @@
|
|||||||
Version 2.00.16 -
|
Version 2.00.16 -
|
||||||
=============================
|
=============================
|
||||||
|
Fix a pvs error path.
|
||||||
xxchange -ae for exclusive activation.
|
xxchange -ae for exclusive activation.
|
||||||
Don't return non-zero status if there aren't any volume groups.
|
Don't return non-zero status if there aren't any volume groups.
|
||||||
Add --alloc argument to tools.
|
Add --alloc argument to tools.
|
||||||
|
@ -58,11 +58,13 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
struct physical_volume *pv, void *handle)
|
struct physical_volume *pv, void *handle)
|
||||||
{
|
{
|
||||||
int consistent = 0;
|
int consistent = 0;
|
||||||
|
int ret = ECMD_PROCESSED;
|
||||||
|
|
||||||
if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) {
|
if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) {
|
||||||
log_error("Can't lock %s: skipping", pv->vg_name);
|
log_error("Can't lock %s: skipping", pv->vg_name);
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(vg = vg_read(cmd, pv->vg_name, &consistent))) {
|
if (!(vg = vg_read(cmd, pv->vg_name, &consistent))) {
|
||||||
log_error("Can't read %s: skipping", pv->vg_name);
|
log_error("Can't read %s: skipping", pv->vg_name);
|
||||||
unlock_vg(cmd, 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))
|
if (!report_object(handle, vg, NULL, pv, NULL))
|
||||||
return ECMD_FAILED;
|
ret = ECMD_FAILED;
|
||||||
|
|
||||||
unlock_vg(cmd, pv->vg_name);
|
unlock_vg(cmd, pv->vg_name);
|
||||||
|
return ret;
|
||||||
return ECMD_PROCESSED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _report(struct cmd_context *cmd, int argc, char **argv,
|
static int _report(struct cmd_context *cmd, int argc, char **argv,
|
||||||
|
Loading…
Reference in New Issue
Block a user