From 9dcbe73897e549df2f2d96a57a71808cf3ef21c2 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Wed, 13 Jun 2007 23:02:51 +0000 Subject: Convert pv->size to get_pv_size --- tools/pvdisplay.c | 2 +- tools/pvresize.c | 6 +++--- tools/pvscan.c | 6 +++--- tools/vgconvert.c | 2 +- tools/vgreduce.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c index 53b63b85..e16836d6 100644 --- a/tools/pvdisplay.c +++ b/tools/pvdisplay.c @@ -57,7 +57,7 @@ static int _pvdisplay_single(struct cmd_context *cmd, } if (!*pv->vg_name) - size = pv->size; + size = get_pv_size(pv); else size = (get_pv_pe_count(pv) - get_pv_pe_alloc_count(pv)) * get_pv_pe_size(pv); diff --git a/tools/pvresize.c b/tools/pvresize.c index 4f0593ef..961769c9 100644 --- a/tools/pvresize.c +++ b/tools/pvresize.c @@ -114,7 +114,7 @@ static int _pvresize_single(struct cmd_context *cmd, log_print("WARNING: %s: Overriding real size. " "You could lose data.", pv_name); log_verbose("%s: Pretending size is %" PRIu64 " not %" PRIu64 - " sectors.", pv_name, params->new_size, pv->size); + " sectors.", pv_name, params->new_size, get_pv_size(pv)); size = params->new_size; } @@ -136,7 +136,7 @@ static int _pvresize_single(struct cmd_context *cmd, if (vg) { pv->size -= get_pv_pe_start(pv); - new_pe_count = pv->size / vg->extent_size; + new_pe_count = get_pv_size(pv) / vg->extent_size; if (!new_pe_count) { log_error("%s: Size must leave space for at " @@ -155,7 +155,7 @@ static int _pvresize_single(struct cmd_context *cmd, } log_verbose("Resizing volume \"%s\" to %" PRIu64 " sectors.", - pv_name, pv->size); + pv_name, get_pv_size(pv)); log_verbose("Updating physical volume \"%s\"", pv_name); if (*pv->vg_name) { diff --git a/tools/pvscan.c b/tools/pvscan.c index 91aa439e..242aff35 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -67,7 +67,7 @@ static void _pvscan_display_single(struct cmd_context *cmd, pv_max_name_len, pv_tmp_name, vg_max_name_len, " ", pv->fmt ? pv->fmt->name : " ", - display_size(cmd, pv->size)); + display_size(cmd, get_pv_size(pv))); return; } @@ -156,8 +156,8 @@ int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), if (!*pv->vg_name) { new_pvs_found++; - size_new += pv->size; - size_total += pv->size; + size_new += get_pv_size(pv); + size_total += get_pv_size(pv); } else size_total += get_pv_pe_count(pv) * get_pv_pe_size(pv); } diff --git a/tools/vgconvert.c b/tools/vgconvert.c index a9c4976c..6b61c9ae 100644 --- a/tools/vgconvert.c +++ b/tools/vgconvert.c @@ -136,7 +136,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, change_made = 1; log_verbose("Set up physical volume for \"%s\" with %" PRIu64 - " available sectors", dev_name(pv->dev), pv->size); + " available sectors", dev_name(pv->dev), get_pv_size(pv)); /* Wipe existing label first */ if (!label_remove(pv->dev)) { diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 332b4dc1..bab443a1 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -367,7 +367,7 @@ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, struct pv_list *pvl; const char *name = dev_name(pv->dev); - if (pv->pe_alloc_count) { + if (get_pv_pe_alloc_count(pv)) { log_error("Physical volume \"%s\" still in use", name); return ECMD_FAILED; } -- cgit