gparted/include
Mike Fleetwood ab2d4f5ee6 Create BlockSpecial class and use in LVM2_PV_Info (#767842)
In some cases creating an LVM2 Physical Volume on top of a DMRaid array
reports no usage information and this partition warning:
    Unable to read the contents of this file system!
    Because of this some operations may be unavailable.
    The cause might be a missing software package.
    The following list of software packages is required for lvm2
    pv file system support: lvm2.

For example on Ubuntu 14.04 LTS (with GParted built with
--enable-libparted-dmraid) create an LVM2 PV in a DMRaid array
partition.  GParted uses this command:
    # lvm pvcreate -M 2 /dev/mapper/isw_bacdehijbd_MyArray0p2

But LVM reports the PV having a different name:
    # lvm pvs
      PV                                                VG   Fmt  Attr PSize PFree
      /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2      lvm2 a--  1.00g 1.00g

This alternate name is loaded into the LVM2_PV_Info module cache.  Hence
when GParted queries partition /dev/mapper/isw_bacdehijbd_MyArray0p2 it
has no PV information against that name and reports unknown usage.

However they are actually the same block special device; major 252,
minor 2:
    # ls -l /dev/mapper/isw_bacdehijbd_MyArray0p2
    brw-rw---- 1 root disk 252, 2 Jul  2 11:09 /dev/mapper/isw_bacdehijbd_MyArray0p2

    # ls -l /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2
    lrwxrwxrwx 1 root root 10 Jul  2 11:09 /dev/disk/by-id/dm-name-isw_bacdehijbd_MyArray0p2 -> ../../dm-2
    # ls -l /dev/dm-2
    brw-rw---- 1 root disk 252, 2 Jul  2 11:09 /dev/dm-2

To determine if two names refer to the same block special device their
major, minor numbers need to be compared, instead of string comparing
their names.

Implement class BlockSpecial which encapsulates the name and major,
minor numbers for a block special device.  Also performs comparison as
needed.  See bug 767842 comments 4 and 5 for further investigation and
decision for choosing to implement a class.

Replace name strings in the LVM2_PV_Info module with BlockSpecial
objects performing correct block special device comparison.

Bug 767842 - File system usage missing when tools report alternate block
             device names
2016-08-06 09:47:58 -06:00
..
.cvsignore added *.swp some modifications to pass 'make distcheck' minor cleanups 2005-11-25 12:59:47 +00:00
BlockSpecial.h Create BlockSpecial class and use in LVM2_PV_Info (#767842) 2016-08-06 09:47:58 -06:00
Copy_Blocks.h Use a single progress bar for the internal block copy operation (#762367) 2016-02-23 10:41:20 -07:00
DMRaid.h Move DEV_MAPPER_PATH from DMRaid.h to Utils.h (#760080) 2016-01-29 13:41:40 -07:00
Device.h Rename Device::add_path() to set_path() (#767842) 2016-08-06 09:47:58 -06:00
DialogFeatures.h Make the File System Support dialog resizable (#342682) 2014-01-27 10:54:48 -07:00
DialogManageFlags.h Stop copying selected partition object in Manage Flags dialog (#750168) 2015-06-10 10:44:33 -06:00
Dialog_Base_Partition.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Disklabel.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Dialog_FileSystem_Label.h Rename class to Dialog_FileSystem_Label (#741424) 2015-02-01 10:08:23 -07:00
Dialog_Partition_Copy.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Partition_Info.h Add encryption section into the Information dialog (#760080) 2016-01-29 13:41:41 -07:00
Dialog_Partition_Name.h Make support of naming for other partition table types possible (#746214) 2015-03-25 10:02:42 -06:00
Dialog_Partition_New.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Partition_Resize_Move.h Use pointer to Partition in Dialog_Base_Partition and derived classes (#759726) 2016-01-26 10:11:35 -07:00
Dialog_Progress.h Change OperationDetail to not store complex objects in STL containers (#729139) 2014-05-18 10:07:45 -06:00
Dialog_Rescue_Data.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
DrawingAreaVisualDisk.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
FS_Info.h Workaround older blkid not distinguishing between FAT16 and FAT32 (#743181) 2015-03-09 11:04:13 -06:00
FileSystem.h Replace 32-bit member variable "index" with wider local variables (#764658) 2016-04-07 09:56:00 -06:00
Frame_Resizer_Base.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Frame_Resizer_Extended.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
GParted_Core.h Populate encrypted Partition member inside PartitionLUKS (#760080) 2016-01-29 13:41:40 -07:00
HBoxOperations.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
LUKS_Info.h Implement demand loading of LUKS_Info cache (#760080) 2016-01-29 13:41:40 -07:00
LVM2_PV_Info.h Create BlockSpecial class and use in LVM2_PV_Info (#767842) 2016-08-06 09:47:58 -06:00
Makefile.am Create BlockSpecial class and use in LVM2_PV_Info (#767842) 2016-08-06 09:47:58 -06:00
Operation.h Use pointers to Partitions in Operation classes (#759726) 2016-01-26 10:11:35 -07:00
OperationChangeUUID.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationCheck.h Prevent assert failure from OperationCheck::get_partition_new() (#767233) 2016-06-05 13:14:34 -06:00
OperationCopy.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationCreate.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationDelete.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationDetail.h Remove unused OperationDetail members (#760709) 2016-02-12 09:09:57 -07:00
OperationFormat.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationLabelFileSystem.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationNamePartition.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationResizeMove.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
Partition.h Rename Partition::add_path() to set_path() (#767842) 2016-08-06 09:47:58 -06:00
PartitionLUKS.h Display messages for encrypted file systems (#760080) 2016-01-29 13:41:41 -07:00
PartitionVector.h Replace all Partition object copy assignment (#759726) 2016-01-26 10:11:35 -07:00
PipeCapture.h Prevent cross thread write after free in _OnReadable() (#731752) 2014-07-06 10:22:40 -06:00
Proc_Partitions_Info.h Remove now unused Proc_Partitions_Info::get_alternate_paths() (#767842) 2016-08-06 09:47:58 -06:00
ProgressBar.h Write a generic progress bar class (#760709) 2016-02-12 09:09:56 -07:00
SWRaid_Info.h Ensure SWRaid_Info cache is loaded at least once (#756829) 2015-11-02 10:03:45 -07:00
TreeView_Detail.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
Utils.h Recognise GRUB2 core.img (#766989) 2016-06-15 12:45:05 -06:00
Win_GParted.h Change copied_partition into a pointer (#759726) 2016-01-26 10:11:35 -07:00
btrfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
exfat.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
ext2.h Only enable ext4 64bit feature when required (#766910) 2016-06-05 09:40:11 -06:00
f2fs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
fat16.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
hfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
hfsplus.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
linux_swap.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
luks.h Populate LUKS partition usage (#760080) 2016-01-29 13:41:40 -07:00
lvm2_pv.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
nilfs2.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ntfs.h Display progress of NTFS file system specific copy operation (#762366) 2016-02-23 10:02:03 -07:00
reiser4.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
reiserfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ufs.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
xfs.h Display progress of XFS file system specific copy operation (#760709) 2016-02-12 09:09:57 -07:00