[gparted] Update allow partition deletion comment in set_valid_operations()



commit ec9b39cc9c6a09251249f9d51ac9c0abf3651acc
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Feb 7 09:18:31 2021 +0000

    Update allow partition deletion comment in set_valid_operations()
    
    This previous commit [1] suggested that in future partition deletion
    might be allowed even while a LUKS mapping was active in that partition.
    To allow deletion of a partition while it has active content is wrong.
    That is a significant reason GParted has busy detection of otherwise
    unrecognised file systems [2] and recognition and busy detection of, but
    otherwise not controllable support for, Linux Software RAID [3] and
    ATARAID [4][5] arrays.
    
    To automatically close the LUKS partition first would be against the
    pattern of behaviour that GParted has established, of requiring explicit
    deactivation of file systems, swap and volume groups before allowing
    deletion.  Therefore update the comment accordingly.
    
    [1] f1e3d42b5604d93dc954f5f218ef489649f11284
        Prevent deletion of open LUKS mappings (#774818)
    
    [2] 49a2e19462fdbe4b28a53cc21a2ddd29d256ff41
        Restore busy detection of unknown mounted file systems (#723842)
    
    [3] d2e1130ad22eb3f52db4dc7f645ed4d5bf119d24
        Detect busy status of Linux Software RAID members (#709640)
    
    [4] 6e990ea48ad4177fbf1a26b5f6d9dd60b218874d
        Detect busy status of mdadm started ATARAID members (#75)
    
    [5] caec22871e2fa869db85831c625f30d70738906e
        Detect busy status of dmraid started ATARAID members (#75)

 src/Win_GParted.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 98fa9498..a35c28ad 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1392,8 +1392,7 @@ void Win_GParted::set_valid_operations()
        {
                allow_format( true ) ;
 
-               // only allow deletion of partitions within a partition table
-               // Also exclude open LUKS mappings until open/close is supported
+               // Only allow deletion of inactive partitions within a partition table.
                if ( ( selected_partition_ptr->type == TYPE_PRIMARY ||
                       selected_partition_ptr->type == TYPE_LOGICAL    ) &&
                     ! selected_partition_ptr->busy                         )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]