1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

More 64-bit display/report fixes.

This commit is contained in:
Alasdair Kergon 2005-02-01 16:19:48 +00:00
parent 3d2aecf0ae
commit 274c88be9f
3 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,6 @@
Version 2.01.03 -
===================================
More 64-bit display/report fixes.
More informative startup mesg if can't create /etc/lvm.
Fix snapshot device size bug (since 2.01.01).
clvmd announces startup and cluster connection in syslog.

View File

@ -258,7 +258,7 @@ void pvdisplay_full(struct cmd_context *cmd, struct physical_volume *pv,
log_print("PV Size %s" " / not usable %s", /* [LVM: %s]", */
size,
display_size(cmd, (pv->size -
pv->pe_count * pv->pe_size),
(uint64_t) pv->pe_count * pv->pe_size),
SIZE_SHORT));
} else

View File

@ -573,7 +573,7 @@ static int _vgsize_disp(struct report_handle *rh, struct field *field,
const struct volume_group *vg = (const struct volume_group *) data;
uint64_t size;
size = vg->extent_count * vg->extent_size;
size = (uint64_t) vg->extent_count * vg->extent_size;
return _size64_disp(rh, field, &size);
}
@ -584,7 +584,7 @@ static int _segstart_disp(struct report_handle *rh, struct field *field,
const struct lv_segment *seg = (const struct lv_segment *) data;
uint64_t start;
start = seg->le * seg->lv->vg->extent_size;
start = (uint64_t) seg->le * seg->lv->vg->extent_size;
return _size64_disp(rh, field, &start);
}
@ -595,7 +595,7 @@ static int _segsize_disp(struct report_handle *rh, struct field *field,
const struct lv_segment *seg = (const struct lv_segment *) data;
uint64_t size;
size = seg->len * seg->lv->vg->extent_size;
size = (uint64_t) seg->len * seg->lv->vg->extent_size;
return _size64_disp(rh, field, &size);
}
@ -610,7 +610,7 @@ static int _pvused_disp(struct report_handle *rh, struct field *field,
if (!pv->pe_count)
used = 0LL;
else
used = pv->pe_alloc_count * pv->pe_size;
used = (uint64_t) pv->pe_alloc_count * pv->pe_size;
return _size64_disp(rh, field, &used);
}
@ -625,7 +625,7 @@ static int _pvfree_disp(struct report_handle *rh, struct field *field,
if (!pv->pe_count)
freespace = pv->size;
else
freespace = (pv->pe_count - pv->pe_alloc_count) * pv->pe_size;
freespace = (uint64_t) (pv->pe_count - pv->pe_alloc_count) * pv->pe_size;
return _size64_disp(rh, field, &freespace);
}
@ -640,7 +640,7 @@ static int _pvsize_disp(struct report_handle *rh, struct field *field,
if (!pv->pe_count)
size = pv->size;
else
size = pv->pe_count * pv->pe_size;
size = (uint64_t) pv->pe_count * pv->pe_size;
return _size64_disp(rh, field, &size);
}
@ -663,7 +663,7 @@ static int _vgfree_disp(struct report_handle *rh, struct field *field,
const struct volume_group *vg = (const struct volume_group *) data;
uint64_t freespace;
freespace = vg->free_count * vg->extent_size;
freespace = (uint64_t) vg->free_count * vg->extent_size;
return _size64_disp(rh, field, &freespace);
}