Fix the hacky solution for the usedSize overflow.
This commit is contained in:
parent
a9655d7fad
commit
e6834393ae
|
@ -141,12 +141,7 @@ void VolumeDialog::updateSizeInfos()
|
||||||
|
|
||||||
QString vgname = dialogWidget().vgName().text();
|
QString vgname = dialogWidget().vgName().text();
|
||||||
if (!vgname.isEmpty()) {
|
if (!vgname.isEmpty()) {
|
||||||
|
totalUsedSize = LvmDevice::getAllocatedPE(vgname) * LvmDevice::getPeSize(vgname);
|
||||||
// allocated PE and PE size value are both 32 bit. will overflow if stringed together.
|
|
||||||
totalUsedSize = LvmDevice::getAllocatedPE(vgname);
|
|
||||||
totalUsedSize *= LvmDevice::getPeSize(vgname);
|
|
||||||
|
|
||||||
|
|
||||||
QStringList lvlist = LvmDevice::getLVs(vgname);
|
QStringList lvlist = LvmDevice::getLVs(vgname);
|
||||||
if (!lvlist.isEmpty() ) {
|
if (!lvlist.isEmpty() ) {
|
||||||
totalLV = lvlist.count();
|
totalLV = lvlist.count();
|
||||||
|
|
Loading…
Reference in New Issue