• D
    partitions/efi: use lba-aware partition records · c2ebdc24
    Davidlohr Bueso 提交于
    The kernel's GPT implementation currently uses the generic 'struct
    partition' type for dealing with legacy MBR partition records.  While this
    is is useful for disklabels that we designed for CHS addressing, such as
    msdos, it doesn't adapt well to newer standards that use LBA instead, such
    as GUID partition tables.  Furthermore, these generic partition structures
    do not have all the required fields to properly follow the UEFI specs.
    
    While a CHS address can be translated to LBA, it's much simpler and
    cleaner to just replace the partition type.  This patch adds a new
    'gpt_record' type that is fully compliant with EFI and will allow, in the
    next patches, to add more checks to properly verify a protective MBR,
    which is paramount to probing a device that makes use of GPT.
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: NDavidlohr Bueso <davidlohr@hp.com>
    Reviewed-by: NKarel Zak <kzak@redhat.com>
    Acked-by: NMatt Fleming <matt.fleming@intel.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    c2ebdc24
efi.c 20.8 KB