Checking if a new partition is targeted by a new VG through LvmDevice::s_DirtyPVs list instead of searching for a CreateVolumeGroupOperation targeting this new partition.
This commit is contained in:
parent
dfca46250e
commit
5a849d802b
|
@ -78,17 +78,8 @@ void CreateVolumeGroupDialog::setupDialog()
|
||||||
|
|
||||||
for (const Device *d : qAsConst(m_Devices)) {
|
for (const Device *d : qAsConst(m_Devices)) {
|
||||||
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
|
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
|
||||||
bool alreadyInPendingVG = false;
|
|
||||||
|
|
||||||
// Looking if there is another VG creation that contains this partition
|
// Looking if there is another VG creation that contains this partition
|
||||||
for (const auto &o : qAsConst(m_PendingOps)) {
|
if (LvmDevice::s_DirtyPVs.contains(p))
|
||||||
if (dynamic_cast<CreateVolumeGroupOperation *>(o) && o->targets(*p)) {
|
|
||||||
alreadyInPendingVG = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (alreadyInPendingVG)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Including new LVM PVs (that are currently in OperationStack and that aren't at other VG creation)
|
// Including new LVM PVs (that are currently in OperationStack and that aren't at other VG creation)
|
||||||
|
|
Loading…
Reference in New Issue