From 5182c037dbfb54d14433709040b3973a838032c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 30 Oct 2016 13:36:01 +0000 Subject: [PATCH] Fix resizing of LVM VGs when LVM PV is encrypted. --- src/jobs/resizevolumegroupjob.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jobs/resizevolumegroupjob.cpp b/src/jobs/resizevolumegroupjob.cpp index 1c17296..24a1069 100644 --- a/src/jobs/resizevolumegroupjob.cpp +++ b/src/jobs/resizevolumegroupjob.cpp @@ -18,6 +18,7 @@ #include "jobs/resizevolumegroupjob.h" #include "core/lvmdevice.h" +#include "fs/luks.h" #include "util/report.h" @@ -40,10 +41,11 @@ bool ResizeVolumeGroupJob::run(Report& parent) Report* report = jobStarted(parent); for (const auto &p : partList()) { + const QString deviceNode = p->roles().has(PartitionRole::Luks) ? static_cast(&p->fileSystem())->mapperName() : p->partitionPath(); if (type() == ResizeVolumeGroupJob::Grow) - rval = LvmDevice::insertPV(*report, device(), p->partitionPath()); // FIXME: LUKS + rval = LvmDevice::insertPV(*report, device(), deviceNode); else if (type() == ResizeVolumeGroupJob::Shrink) - rval = LvmDevice::removePV(*report, device(), p->partitionPath()); // FIXME: LUKS + rval = LvmDevice::removePV(*report, device(), deviceNode); if (rval == false) break;