[gparted] Properly check for file system online resize capabilities (#775932)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Properly check for file system online resize capabilities (#775932)
- Date: Wed, 14 Dec 2016 21:13:12 +0000 (UTC)
commit a1c938b30d8ebb556b0dc539f1fc6b5528312a29
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Wed Oct 26 21:27:56 2016 +0100
Properly check for file system online resize capabilities (#775932)
Resizing a file system only checked the .grow and .shrink support
capabilities of the file system, even when perform online resizing.
This wasn't a issue because .online_grow and .online_shrink were always
set from the offline .grow and .shrink capabilities respectively, but
only when online resizing was possible.
However the Device Mapper encryption mapping used for LUKS can only be
resized when online, and not when offline. Therefore the correct
.online_grow and .online_shrink capabilities needs to be checked to
prevent a LUKS resize step failing as not implemented.
Bug 775932 - Refactor mostly applying of operations
src/GParted_Core.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index f4eb692..8d33542 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2821,13 +2821,13 @@ bool GParted_Core::resize_filesystem_implement( const Partition & partition_old,
{
// grow (always maximises the file system to fill the partition)
fill_partition = true;
- action = fs_cap.grow;
+ action = ( partition_old.busy ) ? fs_cap.online_grow : fs_cap.grow;
}
else
{
// shrink
fill_partition = false;
- action = fs_cap.shrink;
+ action = ( partition_old.busy ) ? fs_cap.online_shrink : fs_cap.shrink;
}
bool success = false;
FileSystem* p_filesystem = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]