Skip to content
Commit 87fc0ad2 authored by Doug Anderson's avatar Doug Anderson Committed by Linus Torvalds
Browse files

block/partitions/efi.c: treat size mismatch as a warning, not an error

In commit 27a7c642

 ("partitions/efi: account for pmbr size in lba")
we started treating bad sizes in lba field of the partition that has the
0xEE (GPT protective) as errors.

However, we may run into these "bad sizes" in the real world if someone
uses dd to copy an image from a smaller disk to a bigger disk.  Since
this case used to work (even without using force_gpt), keep it working
and treat the size mismatch as a warning instead of an error.

Reported-by: default avatarJosh Triplett <josh@joshtriplett.org>
Reported-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Acked-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
Tested-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ef5a22be
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