mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Convert pv->status to get_pv_status
This commit is contained in:
parent
b7dd5ac374
commit
c29f3efd43
@ -124,7 +124,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
|
||||
}
|
||||
|
||||
/* change allocatability for a PV */
|
||||
if (allocatable && (pv->status & ALLOCATABLE_PV)) {
|
||||
if (allocatable && (get_pv_status(pv) & ALLOCATABLE_PV)) {
|
||||
log_error("Physical volume \"%s\" is already "
|
||||
"allocatable", pv_name);
|
||||
if (*pv->vg_name)
|
||||
@ -134,7 +134,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!allocatable && !(pv->status & ALLOCATABLE_PV)) {
|
||||
if (!allocatable && !(get_pv_status(pv) & ALLOCATABLE_PV)) {
|
||||
log_error("Physical volume \"%s\" is already "
|
||||
"unallocatable", pv_name);
|
||||
if (*pv->vg_name)
|
||||
|
@ -68,7 +68,7 @@ static int _pvdisplay_single(struct cmd_context *cmd,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (pv->status & EXPORTED_VG)
|
||||
if (get_pv_status(pv) & EXPORTED_VG)
|
||||
log_print("Physical volume \"%s\" of volume group \"%s\" "
|
||||
"is exported", pv_name, pv->vg_name);
|
||||
|
||||
|
@ -71,7 +71,7 @@ static void _pvscan_display_single(struct cmd_context *cmd,
|
||||
return;
|
||||
}
|
||||
|
||||
if (pv->status & EXPORTED_VG) {
|
||||
if (get_pv_status(pv) & EXPORTED_VG) {
|
||||
strncpy(vg_name_this, pv->vg_name, vg_name_len);
|
||||
log_print("PV %-*s is in exported VG %s "
|
||||
"[%s / %s free]",
|
||||
@ -136,7 +136,7 @@ int pvscan(struct cmd_context *cmd, int argc __attribute((unused)),
|
||||
pv = pvl->pv;
|
||||
|
||||
if ((arg_count(cmd, exported_ARG)
|
||||
&& !(pv->status & EXPORTED_VG))
|
||||
&& !(get_pv_status(pv) & EXPORTED_VG))
|
||||
|| (arg_count(cmd, novolumegroup_ARG) && (*pv->vg_name))) {
|
||||
list_del(&pvl->list);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user