More optimizations for LVM.

This commit is contained in:
Andrius Štikonas 2016-09-08 01:42:13 +01:00
parent da663169f7
commit 95ca21f4e2
3 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, const QList<De
void CreateVolumeGroupDialog::setupDialog()
{
for (const auto &p : FS::lvm2_pv::getFreePV(m_Devices)) {
for (const auto &p : FS::lvm2_pv::getPVs(m_Devices)) {
if (!LvmDevice::s_DirtyPVs.contains(p->deviceNode())) {
dialogWidget().listPV().addPartition(p->deviceNode(), false);
}

View File

@ -136,9 +136,9 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
createLabels(i18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
createLabels(i18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
createLabels(i18nc("@label partition", "PE Size:"), Capacity::formatByteSize(lvm2PVFs->peSize()), cols(area), x, y);
createLabels(i18nc("@label partition", "Total PE:"), QString::number(lvm2PVFs->getTotalPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Free PE:"), QString::number(lvm2PVFs->getFreePE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Allocated PE:"), QString::number(lvm2PVFs->getAllocatedPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Total PE:"), QString::number(lvm2PVFs->totalPE()), cols(area), x, y);
createLabels(i18nc("@label partition", "Free PE:"), QString::number(lvm2PVFs->freePE()), cols(area), x, y);
createLabels(i18nc("@label partition", "Allocated PE:"), QString::number(lvm2PVFs->allocatedPE()), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);

View File

@ -32,7 +32,7 @@
/** Creates a new ResizeVolumeGroupDialog
@param parent pointer to the parent widget
@param dev the Device to show properties for
@param d the Device to show properties for
*/
ResizeVolumeGroupDialog::ResizeVolumeGroupDialog(QWidget* parent, const QList<Device*>& devices, QString& vgName, QStringList& partList, VolumeManagerDevice& d) :
VolumeGroupDialog(parent, vgName, partList),
@ -52,7 +52,7 @@ void ResizeVolumeGroupDialog::setupDialog()
{
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
dialogWidget().listPV().addPartitionList(device().deviceNodes(), true);
for (const auto &p : FS::lvm2_pv::getFreePV(m_Devices)) {
for (const auto &p : FS::lvm2_pv::getPVs(m_Devices)) {
if (!LvmDevice::s_DirtyPVs.contains(p->deviceNode())) {
dialogWidget().listPV().addPartition(p->deviceNode(), false);
}