access_str == 0 ? "error" : "");
log_print("VG Status %s%sresizable",
vg_is_exported(vg) ? "exported/" : "",
- vg->status & RESIZEABLE_VG ? "" : "NOT ");
+ vg_is_resizeable(vg) ? "" : "NOT ");
/* vg number not part of LVM2 design
log_print ("VG # %u\n", vg->vg_number);
*/
struct pv_segment *pvseg;
uint32_t s;
- if (!(vg_status(vg) & RESIZEABLE_VG)) {
+ if (!vg_is_resizeable(vg)) {
log_error("Volume group \"%s\" must be resizeable "
"to change PE size", vg->name);
return 0;
int vg_set_max_lv(struct volume_group *vg, uint32_t max_lv)
{
- if (!(vg_status(vg) & RESIZEABLE_VG)) {
+ if (!vg_is_resizeable(vg)) {
log_error("Volume group \"%s\" must be resizeable "
"to change MaxLogicalVolume", vg->name);
return 0;
int vg_set_max_pv(struct volume_group *vg, uint32_t max_pv)
{
- if (!(vg_status(vg) & RESIZEABLE_VG)) {
+ if (!vg_is_resizeable(vg)) {
log_error("Volume group \"%s\" must be resizeable "
"to change MaxPhysicalVolumes", vg->name);
return 0;
}
if ((status & EXPORTED_VG) &&
- (vg->status & EXPORTED_VG)) {
+ vg_is_exported(vg)) {
log_error("Volume group %s is exported", vg->name);
failure |= FAILED_EXPORTED;
}
}
if ((status & RESIZEABLE_VG) &&
- !(vg->status & RESIZEABLE_VG)) {
+ !vg_is_resizeable(vg)) {
log_error("Volume group %s is not resizeable.", vg->name);
failure |= FAILED_RESIZEABLE;
}
* - metadata inconsistent and automatic correction failed: FAILED_INCONSISTENT
* - VG is read-only: FAILED_READ_ONLY
* - VG is EXPORTED, unless flags has READ_ALLOW_EXPORTED: FAILED_EXPORTED
- * - VG is not RESIZEABLE, unless flags has ALLOW_NONRESIZEABLE:
- * FAILED_RESIZEABLE
+ * - VG is not RESIZEABLE: FAILED_RESIZEABLE
* - locking failed: FAILED_LOCKING
*
* On failures, all locks are released, unless one of the following applies:
{
int resizeable = !strcmp(arg_str_value(cmd, resizeable_ARG, "n"), "y");
- if (resizeable && (vg_status(vg) & RESIZEABLE_VG)) {
+ if (resizeable && vg_is_resizeable(vg)) {
log_error("Volume group \"%s\" is already resizeable",
vg->name);
return ECMD_FAILED;
}
- if (!resizeable && !(vg_status(vg) & RESIZEABLE_VG)) {
+ if (!resizeable && !vg_is_resizeable(vg)) {
log_error("Volume group \"%s\" is already not resizeable",
vg->name);
return ECMD_FAILED;