partitionmanager: read used sectors after setting label and UUID

fixes reading of used sectors in some cases (e.g. ZFS which will be
implemented in follow up commit)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-11-16 20:44:48 +02:00
parent 4a82f19028
commit 057106bf68

View file

@ -381,14 +381,14 @@ void LibPartedBackend::scanDevicePartitions(PedDevice*, Device& d, PedDisk* pedD
Partition* part = new Partition(parent, d, PartitionRole(r), fs, pedPartition->geom.start, pedPartition->geom.end, node, availableFlags(pedPartition), mountPoint, mounted, activeFlags(pedPartition));
readSectorsUsed(pedDisk, d, *part, mountPoint);
if (fs->supportGetLabel() != FileSystem::cmdSupportNone)
fs->setLabel(fs->readLabel(part->deviceNode()));
if (fs->supportGetUUID() != FileSystem::cmdSupportNone)
fs->setUUID(fs->readUUID(part->deviceNode()));
readSectorsUsed(pedDisk, d, *part, mountPoint);
parent->append(part);
partitions.append(part);
}