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
This commit is contained in:
parent
a0158abbeb
commit
a1c938b30d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue