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:
parent
3d2aecf0ae
commit
274c88be9f
@ -1,5 +1,6 @@
|
|||||||
Version 2.01.03 -
|
Version 2.01.03 -
|
||||||
===================================
|
===================================
|
||||||
|
More 64-bit display/report fixes.
|
||||||
More informative startup mesg if can't create /etc/lvm.
|
More informative startup mesg if can't create /etc/lvm.
|
||||||
Fix snapshot device size bug (since 2.01.01).
|
Fix snapshot device size bug (since 2.01.01).
|
||||||
clvmd announces startup and cluster connection in syslog.
|
clvmd announces startup and cluster connection in syslog.
|
||||||
|
@ -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]", */
|
log_print("PV Size %s" " / not usable %s", /* [LVM: %s]", */
|
||||||
size,
|
size,
|
||||||
display_size(cmd, (pv->size -
|
display_size(cmd, (pv->size -
|
||||||
pv->pe_count * pv->pe_size),
|
(uint64_t) pv->pe_count * pv->pe_size),
|
||||||
SIZE_SHORT));
|
SIZE_SHORT));
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
@ -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;
|
const struct volume_group *vg = (const struct volume_group *) data;
|
||||||
uint64_t size;
|
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);
|
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;
|
const struct lv_segment *seg = (const struct lv_segment *) data;
|
||||||
uint64_t start;
|
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);
|
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;
|
const struct lv_segment *seg = (const struct lv_segment *) data;
|
||||||
uint64_t size;
|
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);
|
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)
|
if (!pv->pe_count)
|
||||||
used = 0LL;
|
used = 0LL;
|
||||||
else
|
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);
|
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)
|
if (!pv->pe_count)
|
||||||
freespace = pv->size;
|
freespace = pv->size;
|
||||||
else
|
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);
|
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)
|
if (!pv->pe_count)
|
||||||
size = pv->size;
|
size = pv->size;
|
||||||
else
|
else
|
||||||
size = pv->pe_count * pv->pe_size;
|
size = (uint64_t) pv->pe_count * pv->pe_size;
|
||||||
|
|
||||||
return _size64_disp(rh, field, &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;
|
const struct volume_group *vg = (const struct volume_group *) data;
|
||||||
uint64_t freespace;
|
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);
|
return _size64_disp(rh, field, &freespace);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user