1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Convert pv->size to get_pv_size

This commit is contained in:
Dave Wysochanski 2007-06-13 23:02:51 +00:00
parent becc177dac
commit 9dcbe73897
5 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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);
}

View File

@ -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)) {

View File

@ -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;
}