Commit 4e11ea7a authored by Matt Domsch's avatar Matt Domsch Committed by Linus Torvalds

[PATCH] EFI GPT: reduce alternate header probing

EFI partitioning scheme was reading the last reported sector of the
block device to look for the alternate GPT header, before it had
confirmed that it should.  This causes problems for devices with the
following problems:  a) those who misreport their size (typically
off-by-one), and b) those who fail when asked to read a block
outside their range.

This patch moves the test for the Protective Master Boot Record (PMBR)
ahead of the tests for the Primary and Alternate GPT headers.  If the
PMBR is not valid, the disk is assumed to not be a GPT disk.  This can
be overridden with the 'gpt' kernel command line option.  If the
Primary GPT header is not valid, the Alternate GPT header is not
probed automatically unless the 'gpt' kernel command line option is
passed.  If the both the PMBR and Primary GPT header are valid, then
the Alternate GPT header at the end of the disk is probed.

Also re-enables CONFIG_EFI_PARTITION for all architectures.
Signed-off-by: default avatarMatt Domsch <Matt_Domsch@dell.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2b6ba494
...@@ -219,7 +219,7 @@ config SUN_PARTITION ...@@ -219,7 +219,7 @@ config SUN_PARTITION
config EFI_PARTITION config EFI_PARTITION
bool "EFI GUID Partition support" bool "EFI GUID Partition support"
depends on PARTITION_ADVANCED && IA64 depends on PARTITION_ADVANCED
select CRC32 select CRC32
help help
Say Y here if you would like to use hard disks under Linux which Say Y here if you would like to use hard disks under Linux which
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment