diff options
-rw-r--r-- | tools/pvchange.c | 8 | ||||
-rw-r--r-- | tools/pvdisplay.c | 4 | ||||
-rw-r--r-- | tools/pvmove.c | 2 | ||||
-rw-r--r-- | tools/pvremove.c | 2 | ||||
-rw-r--r-- | tools/pvresize.c | 2 | ||||
-rw-r--r-- | tools/pvscan.c | 2 | ||||
-rw-r--r-- | tools/reporter.c | 8 |
7 files changed, 14 insertions, 14 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c index c77b1526..1163b865 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -55,12 +55,12 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv, log_verbose("Finding volume group of physical volume \"%s\"", pv_name); - if (!lock_vol(cmd, pv->vg_name, LCK_VG_WRITE)) { + if (!lock_vol(cmd, get_pv_vg_name(pv), LCK_VG_WRITE)) { log_error("Can't get lock for %s", get_pv_vg_name(pv)); return 0; } - if (!(vg = vg_read(cmd, pv->vg_name, NULL, &consistent))) { + if (!(vg = vg_read(cmd, get_pv_vg_name(pv), NULL, &consistent))) { unlock_vg(cmd, get_pv_vg_name(pv)); log_error("Unable to find volume group of \"%s\"", pv_name); @@ -115,7 +115,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv, } if (arg_count(cmd, allocatable_ARG)) { - if (!*pv->vg_name && + if (!*get_pv_vg_name(pv) && !(pv->fmt->features & FMT_ORPHAN_ALLOCATABLE)) { log_error("Allocatability not supported by orphan " "%s format PV %s", pv->fmt->name, pv_name); @@ -181,7 +181,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv, } log_verbose("Changing uuid of %s to %s.", pv_name, uuid); if (*get_pv_vg_name(pv)) { - orig_vg_name = pv->vg_name; + orig_vg_name = get_pv_vg_name(pv); orig_pe_alloc_count = get_pv_pe_alloc_count(pv); pv->vg_name = ORPHAN; pv->pe_alloc_count = 0; diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c index 19118d96..293970b7 100644 --- a/tools/pvdisplay.c +++ b/tools/pvdisplay.c @@ -27,12 +27,12 @@ static int _pvdisplay_single(struct cmd_context *cmd, const char *pv_name = dev_name(get_pv_dev(pv)); if (get_pv_vg_name(pv)) { - if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) { + if (!lock_vol(cmd, get_pv_vg_name(pv), LCK_VG_READ)) { log_error("Can't lock %s: skipping", get_pv_vg_name(pv)); return ECMD_FAILED; } - if (!(vg = vg_read(cmd, pv->vg_name, (char *)&pv->vgid, &consistent))) { + if (!(vg = vg_read(cmd, get_pv_vg_name(pv), (char *)&pv->vgid, &consistent))) { log_error("Can't read %s: skipping", get_pv_vg_name(pv)); goto out; } diff --git a/tools/pvmove.c b/tools/pvmove.c index 1366dedf..189ecf8f 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -281,7 +281,7 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name, } if (arg_count(cmd, name_ARG)) { - if (!(lv_name = _extract_lvname(cmd, pv->vg_name, + if (!(lv_name = _extract_lvname(cmd, get_pv_vg_name(pv), arg_value(cmd, name_ARG)))) { stack; return EINVALID_CMD_LINE; diff --git a/tools/pvremove.c b/tools/pvremove.c index 9abc78eb..d2e7b25c 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -65,7 +65,7 @@ static int pvremove_check(struct cmd_context *cmd, const char *name) log_print("WARNING: Wiping physical volume label from " "%s%s%s%s", name, pv->vg_name[0] ? " of volume group \"" : "", - pv->vg_name[0] ? pv->vg_name : "", + pv->vg_name[0] ? get_pv_vg_name(pv) : "", pv->vg_name[0] ? "\"" : ""); } diff --git a/tools/pvresize.c b/tools/pvresize.c index eabcaaf3..531dd338 100644 --- a/tools/pvresize.c +++ b/tools/pvresize.c @@ -63,7 +63,7 @@ static int _pvresize_single(struct cmd_context *cmd, return ECMD_FAILED; } } else { - vg_name = pv->vg_name; + vg_name = get_pv_vg_name(pv); if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) { log_error("Can't get lock for %s", get_pv_vg_name(pv)); diff --git a/tools/pvscan.c b/tools/pvscan.c index 0a25bac8..74b48fec 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -72,7 +72,7 @@ static void _pvscan_display_single(struct cmd_context *cmd, } if (get_pv_status(pv) & EXPORTED_VG) { - strncpy(vg_name_this, pv->vg_name, vg_name_len); + strncpy(vg_name_this, get_pv_vg_name(pv), vg_name_len); log_print("PV %-*s is in exported VG %s " "[%s / %s free]", pv_max_name_len, pv_tmp_name, diff --git a/tools/reporter.c b/tools/reporter.c index 9300a6a6..340b7486 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -61,12 +61,12 @@ static int _pvsegs_sub_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv = pvseg->pv; int ret = ECMD_PROCESSED; - if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) { + if (!lock_vol(cmd, get_pv_vg_name(pv), LCK_VG_READ)) { log_error("Can't lock %s: skipping", get_pv_vg_name(pv)); return ECMD_FAILED; } - if (!(vg = vg_read(cmd, pv->vg_name, NULL, &consistent))) { + if (!(vg = vg_read(cmd, get_pv_vg_name(pv), NULL, &consistent))) { log_error("Can't read %s: skipping", get_pv_vg_name(pv)); goto out; } @@ -107,12 +107,12 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg, int ret = ECMD_PROCESSED; if (get_pv_vg_name(pv)) { - if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) { + if (!lock_vol(cmd, get_pv_vg_name(pv), LCK_VG_READ)) { log_error("Can't lock %s: skipping", get_pv_vg_name(pv)); return ECMD_FAILED; } - if (!(vg = vg_read(cmd, pv->vg_name, (char *)&pv->vgid, &consistent))) { + if (!(vg = vg_read(cmd, get_pv_vg_name(pv), (char *)&pv->vgid, &consistent))) { log_error("Can't read %s: skipping", get_pv_vg_name(pv)); goto out; } |