From: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
To: Davidlohr Bueso <dbueso-IBi9RG/b67k@public.gmane.org>
Cc: Jens-l3A5Bk7waGM@public.gmane.org, "Axboe <axboe"@kernel.dk,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>,
Hannes Reinecke <hare-IBi9RG/b67k@public.gmane.org>
Subject: [PATCH] partitions/efi: Ignore errors when alternate GPT is not at the end of disk
Date: Mon, 17 Oct 2016 12:20:30 +0200 [thread overview]
Message-ID: <1476699630-127009-1-git-send-email-hare@suse.de> (raw)
The GPT specification requires that the alternate GPT is at the
end of the disk. However, if a Software RAID1 is enabled the RAID
metadata typically placed at the end of the disk, and the actual
size of the disk is decreased by the size of the metadata.
Plus it's perfectly legit to have a partition table which is
_smaller_ than the device; eg we don't check for the device
size in the msdos partition, neither.
So don't print out a warning here.
Signed-off-by: Hannes Reinecke <hare-IBi9RG/b67k@public.gmane.org>
---
block/partitions/efi.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index bcd86e5..011faa7 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -550,21 +550,6 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
le32_to_cpu(agpt->partition_entry_array_crc32));
error_found++;
}
- if (le64_to_cpu(pgpt->alternate_lba) != lastlba) {
- pr_warn("GPT:Primary header thinks Alt. header is not at the end of the disk.\n");
- pr_warn("GPT:%lld != %lld\n",
- (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
- (unsigned long long)lastlba);
- error_found++;
- }
-
- if (le64_to_cpu(agpt->my_lba) != lastlba) {
- pr_warn("GPT:Alternate GPT header not at the end of the disk.\n");
- pr_warn("GPT:%lld != %lld\n",
- (unsigned long long)le64_to_cpu(agpt->my_lba),
- (unsigned long long)lastlba);
- error_found++;
- }
if (error_found)
pr_warn("GPT: Use GNU Parted to correct GPT errors.\n");
--
1.8.5.6
next reply other threads:[~2016-10-17 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 10:20 Hannes Reinecke [this message]
[not found] ` <1476699630-127009-1-git-send-email-hare-l3A5Bk7waGM@public.gmane.org>
2016-10-18 9:56 ` [PATCH] partitions/efi: Ignore errors when alternate GPT is not at the end of disk Karel Zak
[not found] ` <20161018095637.tgdjehscttskqz5q-xkT7n84Rsxv/9pzu0YdTqQ@public.gmane.org>
2016-10-18 10:07 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476699630-127009-1-git-send-email-hare@suse.de \
--to=hare-l3a5bk7wagm@public.gmane.org \
--cc="Axboe <axboe"@kernel.dk \
--cc=Jens-l3A5Bk7waGM@public.gmane.org \
--cc=dbueso-IBi9RG/b67k@public.gmane.org \
--cc=hare-IBi9RG/b67k@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox