diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2007-06-13 22:11:29 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2007-06-13 22:11:29 +0000 |
commit | ec26c285c2cdc16f1433bc4cf9f86be670f3bbe6 (patch) | |
tree | 899e453e4f278913ae5dff3bb5e6660c386b1952 | |
parent | aeea47205b846310303c74a990686a2ae3f073ad (diff) | |
download | lvm2-ec26c285c2cdc16f1433bc4cf9f86be670f3bbe6.tar.gz lvm2-ec26c285c2cdc16f1433bc4cf9f86be670f3bbe6.tar.xz lvm2-ec26c285c2cdc16f1433bc4cf9f86be670f3bbe6.zip |
Convert pv->pe_count to get_pv_pe_count
-rw-r--r-- | tools/pvscan.c | 6 | ||||
-rw-r--r-- | tools/vgreduce.c | 4 | ||||
-rw-r--r-- | tools/vgsplit.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c index 23cdd15f..e1fa5448 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -77,7 +77,7 @@ static void _pvscan_display_single(struct cmd_context *cmd, "[%s / %s free]", pv_max_name_len, pv_tmp_name, vg_name_this, - display_size(cmd, (uint64_t) pv->pe_count * + display_size(cmd, (uint64_t) get_pv_pe_count(pv) * pv->pe_size), display_size(cmd, (uint64_t) (pv->pe_count - pv->pe_alloc_count) @@ -89,7 +89,7 @@ static void _pvscan_display_single(struct cmd_context *cmd, log_print("PV %-*s VG %-*s %s [%s / %s free]", pv_max_name_len, pv_tmp_name, vg_max_name_len, vg_tmp_name, pv->fmt ? pv->fmt->name : " ", - display_size(cmd, (uint64_t) pv->pe_count * pv->pe_size), + display_size(cmd, (uint64_t) get_pv_pe_count(pv) * pv->pe_size), display_size(cmd, (uint64_t) (pv->pe_count - get_pv_pe_alloc_count(pv)) * pv->pe_size)); @@ -158,7 +158,7 @@ int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), size_new += pv->size; size_total += pv->size; } else - size_total += pv->pe_count * pv->pe_size; + size_total += get_pv_pe_count(pv) * pv->pe_size; } /* find maximum pv name length */ diff --git a/tools/vgreduce.c b/tools/vgreduce.c index f2b438f8..332b4dc1 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -397,8 +397,8 @@ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, } vg->pv_count--; - vg->free_count -= pv->pe_count - get_pv_pe_alloc_count(pv); - vg->extent_count -= pv->pe_count; + vg->free_count -= get_pv_pe_count(pv) - get_pv_pe_alloc_count(pv); + vg->extent_count -= get_pv_pe_count(pv); if (!vg_write(vg) || !vg_commit(vg)) { log_error("Removal of physical volume \"%s\" from " diff --git a/tools/vgsplit.c b/tools/vgsplit.c index d7e7c903..dc1e8aee 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -35,11 +35,11 @@ static int _move_pv(struct volume_group *vg_from, struct volume_group *vg_to, pv = list_item(pvl, struct pv_list)->pv; - vg_from->extent_count -= pv->pe_count; - vg_to->extent_count += pv->pe_count; + vg_from->extent_count -= get_pv_pe_count(pv); + vg_to->extent_count += get_pv_pe_count(pv); - vg_from->free_count -= pv->pe_count - get_pv_pe_alloc_count(pv); - vg_to->free_count += pv->pe_count - get_pv_pe_alloc_count(pv); + vg_from->free_count -= get_pv_pe_count(pv) - get_pv_pe_alloc_count(pv); + vg_to->free_count += get_pv_pe_count(pv) - get_pv_pe_alloc_count(pv); return 1; } |