Slightly improve setting used sectors.

This commit is contained in:
Andrius Štikonas 2016-04-29 15:33:26 +01:00
parent e2f21360bb
commit 47a1594705
2 changed files with 2 additions and 2 deletions

View File

@ -338,7 +338,8 @@ void luks::loadInnerFileSystem(const QString& mapperNode)
*this);
setLabel(m_innerFs->readLabel(mapperNode));
setUUID(m_innerFs->readUUID(mapperNode));
setSectorsUsed(m_innerFs->readUsedCapacity(mapperNode)/m_logicalSectorSize);
if (m_innerFs->supportGetUsed() == FileSystem::cmdSupportFileSystem) // FIXME:also implement checking space if partition is mounted
setSectorsUsed(m_innerFs->readUsedCapacity(mapperNode)/m_logicalSectorSize);
}
void luks::createInnerFileSystem(FileSystem::Type type)

View File

@ -362,7 +362,6 @@ void LibPartedBackend::scanDevicePartitions(PedDevice*, Device& d, PedDisk* pedD
if (isCryptOpen) {
luksFs->loadInnerFileSystem(mapperNode);
luksFs->setSectorsUsed(luksFs->readUsedCapacity(mapperNode) / d.logicalSectorSize());
mountPoint = mountPoints.findByDevice(mapperNode) ?
mountPoints.findByDevice(mapperNode)->mountPoint() :