HomeFreeBSD

gpart: Be less picky about GPT Tables in some cases

Description

gpart: Be less picky about GPT Tables in some cases

When we're recoverying a damangae GPT, or when we're restoring a backed
up partition tables, don't enforce the 4k alignment for start/end LBAs.
This is useful for 512e/4kn drives when we're creating a new partition
table or partition. However, when we're trying to fix / restore an old
partition, we shouldn't force this alignment, since in that case it's
more important to use the partition table as is than to optimize
performance by rounding (which isn't required by the standard).

MFC After: 1 week (pushed more quickly per re@)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D42359

(cherry picked from commit 5c9f0f72f47ea5315e5147185e47c2efca2e8c85)
(cherry picked from commit 859d674e1745d0a37c9c8d77e21a3fadd713ef49)
Approved-by: re (gjb)

Details

Provenance
impAuthored on Oct 26 2023, 4:14 PM
Differential Revision
D42359: gpart: Be less picky about GPT Tables in some cases
Parents
rGabf5807ffc36: bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS)
Branches
Unknown
Tags
Unknown