Fix LV used space.

This commit is contained in:
Chantara Tith 2016-06-26 00:25:05 +07:00
parent c0e3288741
commit 503c493daf
1 changed files with 4 additions and 1 deletions

View File

@ -112,9 +112,12 @@ Partition* LvmDevice::scanPartition(const QString& lvpath, const LvmDevice& dev,
const KDiskFreeSpaceInfo freeSpaceInfo = KDiskFreeSpaceInfo::freeSpaceInfo(mountPoint);
FileSystem* fs = FileSystemFactory::create(FileSystem::detectFileSystem(lvpath), 0, lvSize - 1);
//TODO: fix used space report. currently incorrect
if (mounted && freeSpaceInfo.isValid() && mountPoint != QString()) {
//TODO: fix used space report. currently incorrect
fs->setSectorsUsed(freeSpaceInfo.used() / logicalSize());
} else if (fs->supportGetUsed() == FileSystem::cmdSupportFileSystem) {
fs->setSectorsUsed(fs->readUsedCapacity(lvpath) / logicalSize());
}
if (fs->supportGetLabel() != FileSystem::cmdSupportNone) {