Implement usage reporting of active encrypted swap partitions (#771670)
GParted does not show the usage of active encrypted swap partitions, instead showing partition warning "Unable to read the contents of this file system! ...". OS setup: # ls -l /dev/mapper/sdb4_crypt /dev/dm-3 brw-rw----. 1 root disk 253, 3 Sep 14 07:26 /dev/dm-3 lrwxrwxrwx. 1 root root 7 Sep 14 07:26 /dev/mapper/sdb4_crypt -> ../dm-3 # mkswap -L encrypted_swap /dev/mapper/sdb4_crypt # swapon /dev/mapper/sdb4_crypt # cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 2097148 237632 -1 /dev/dm-3 partition 1046524 0 -2 This is because the code was performing a string compare between the canonical /dev/mapper/sdb4_crypt name GParted is using and the /dev/dm-3 name reported by the kernel via /proc/swaps. Fix by creating BlockSpecial objects from the names and compare those so that comparison is done correctly using major, minor numbers. Bug 771670 - Usage of active encrypted swap is not shown
parent
3d780457
Please register or sign in to comment