path: root/sys/modules/cxgbe/if_cc
diff options
authorEugene Grosbein <eugen@FreeBSD.org>2020-09-21 12:37:41 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2020-09-21 12:37:41 +0000
commita8c2d3888a18878b5d4e4ce0382bbbe0bf1b2a10 (patch)
tree5ebcae8edbc5f54e4d77f308707c0d680a73bdaa /sys/modules/cxgbe/if_cc
parent54acd65f6f6162873aa3f9b4c6a115ad50bb0d84 (diff)
MFS r365667,r365920: extend kern.geom.part.check_integrity to work on GPT
There are multiple USB/SATA bridges on the market that unconditionally cut some LBAs off connected media. This could be a problem for pre-partitioned drives so GEOM complains and does not create devices in /dev for slices/partitions preventing access to existing data. We have a knob kern.geom.part.check_integrity that allows us to correct partitioning if changed from default 1 to 0 but it works for MBR only. If backup copy of GPT is unavailable due to decreased number of LBAs, the kernel does not give access to partitions still and prints to dmesg: GEOM: md0: corrupt or invalid GPT detected. GEOM: md0: GPT rejected -- may not be recoverable. This change makes it work for GPT too, so it created partitions in /dev and prints to dmesg this instead: GEOM: md0: the secondary GPT table is corrupt or invalid. GEOM: md0: using the primary only -- recovery suggested. Then "gpart recover" re-creates backup copy of GPT and allows further manipulations with partitions. This change is no-op for default configuration having kern.geom.part.check_integrity=1 Reported by: Alex Korchmar Approved by: re (gjb)
Notes: svn path=/releng/12.2/; revision=365944
Diffstat (limited to 'sys/modules/cxgbe/if_cc')
0 files changed, 0 insertions, 0 deletions