Restore busy detection of unknown mounted file systems (#723842)
Previous commit: Make partition busy detection method selectable per file system (#723842) causes GParted to no longer detect an unknown mounted file system as busy. This is needed because there are many less popular file systems which Linux can mount but GParted doesn't recognise, such as: Acorn ADFS, AFFS, BeFS, BFS, etc. Encountering an unrecognised mounted device can also occur with btrfs on Linux 3.4 and earlier when the mounting device is deleted from a multi-device btrfs file system. Happens because /proc/mounts continues to show the original mounting device even after that device was deleted from the file system. # mkfs.btrfs /dev/sdb1 # mount /dev/sdb1 /mnt/1 # btrfs device add /dev/sdb2 /mnt/1 # btrfs device delete /dev/sdb1 /mnt/1 # btrfs filesystem sync /mnt/1 # grep btrfs /proc/mounts /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0 # blkid /dev/sdb1 # btrfs filesystem show /dev/sdb1 # blkid /dev/sdb2 /dev/sdb2: UUID="9c75647c-217a-4718-bcc7-f3ccd8cc7dc6" UUID_SUB="b5d43630-80d4-42ac-b406-185e97cd5bbe" TYPE="btrfs" # btrfs filesystem show /dev/sdb2 Label: none uuid: 9c75647c-217a-4718-bcc7-f3ccd8cc7dc6 Total devices 1 FS bytes used 28.00KB devid 2 size 2.00GB used 1.02GB path /dev/sdb2 Reinstate the search for mounted partitions for busy detection even for unrecognised file system types. Bug #723842 - GParted resizes the wrong filesystem (does not pass the devid to btrfs filesystem resize)
This commit is contained in:
parent
b1dc9e69e3
commit
49a2e19462
|
@ -1590,8 +1590,14 @@ bool GParted_Core::is_busy( FILESYSTEM fstype, const Glib::ustring & path )
|
|||
}
|
||||
else
|
||||
{
|
||||
//Still search GParted internal mounted partitions map in case an
|
||||
// unknown file system is mounted
|
||||
iter_mp = mount_info .find( path ) ;
|
||||
if ( iter_mp != mount_info .end() )
|
||||
busy = true ;
|
||||
|
||||
//Custom checks for recognised but other not-supported file system types
|
||||
busy = ( fstype == FS_LINUX_SWRAID && Utils::swraid_member_is_active( path ) ) ;
|
||||
busy |= ( fstype == FS_LINUX_SWRAID && Utils::swraid_member_is_active( path ) ) ;
|
||||
}
|
||||
|
||||
return busy ;
|
||||
|
|
Loading…
Reference in New Issue