Patches for GPT and geli recovery

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Sun, 19 Dec 2021 16:50:11 UTC
Recently one of my disks "experienced a data corruption
event of unknown origin". Additional details are available at:
<https://www.fabiankeil.de/gehacktes/gpt-and-geli-recovery/>

TLDR: I created two patches to recover nearly all the data.

The first patch implements a "search" subcommand for geli
to look for valid meta data (but unfortunately the meta
data on my disk was corrupted or gone):
<https://www.fabiankeil.de/sourcecode/electrobsd/ElectroBSD-12-20211218-55bc8edfe8d2-geli-search.diff>

The second patch lets the kernel ignore more issues if
kern.geom.part.check_integrity is set to 0:
<https://www.fabiankeil.de/sourcecode/electrobsd/ElectroBSD-12-52515feff497-2021.12.17-sys-geom-part-Ignore-more-errors.diff>

I'm wondering if those patches should be upstreamed.

The first patch is probably safe but for the second
one I only tested the code paths that were relevant
for my issue.

BTW, I would also be interested to know if others have
experienced similar data corruption and could figure
out how it happened.

Fabian