From aaffe54161b32e281defbbfeb6e76a8f8ecfce6b Mon Sep 17 00:00:00 2001 From: Caio Carvalho Date: Fri, 24 Aug 2018 12:03:24 -0300 Subject: [PATCH] Setting RAID status as inactive after deactivation. --- src/jobs/deactivatevolumegroupjob.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jobs/deactivatevolumegroupjob.cpp b/src/jobs/deactivatevolumegroupjob.cpp index 528adac..7fbd3e1 100644 --- a/src/jobs/deactivatevolumegroupjob.cpp +++ b/src/jobs/deactivatevolumegroupjob.cpp @@ -49,9 +49,15 @@ bool DeactivateVolumeGroupJob::run(Report& parent) partition->setMounted(false); } } - else if (device().type() == Device::Type::SoftwareRAID_Device) + else if (device().type() == Device::Type::SoftwareRAID_Device) { rval = SoftwareRAID::stopSoftwareRAID(*report, device().deviceNode()); + if (rval) { + SoftwareRAID *raid = static_cast< SoftwareRAID* >(&device()); + raid->setStatus(SoftwareRAID::Status::Inactive); + } + } + jobFinished(*report, rval); return rval;