freebsd-dev/sys/geom
Marcel Moolenaar 96937e3b23 Revert revision 254095
In revision 254095, gpt_entries is not set to match the on-disk
hdr_entries, but rather is computed based on available space.
There are 2 problems with this:

1.  The GPT backend respects hdr_entries and only reads and writes
    that number of partition entries.  On top of that, CRC32 is
    computed over the table that has hdr_entries elements.  When
    the common code works on what is possibly a larger number, the
    behaviour becomes inconsistent and problematic.  In particular,
    it would be possible to add a new partition that on a reboot
    isn't there anymore.
2.  The calculation of gpt_entries is based on flawed assumptions.
    The GPT specification does not dictate that sectors are layed
    out in a particular way that the available space can be
    determined by looking at LBAs.  In practice, implementations
    do the same thing, because there's no reason to do it any
    other way.  Still, GPT allows certain freedoms that can be
    exploited in some form or shape if the need arises.

PR:		229977
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19438
2019-03-05 04:15:34 +00:00
..
bde Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
cache Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
concat Add a missing return statement to g_concat_kernel_dump(). 2019-02-26 18:30:51 +00:00
eli Restore backward compatibility for "attach" verb. 2018-10-27 03:37:14 +00:00
gate geom_gate: enable resize 2018-07-13 07:08:06 +00:00
journal Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
label Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
linux_lvm Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
mirror gmirror: Relocate DEVICE_FLAGS to adjacent lines 2019-01-23 16:44:21 +00:00
mountver Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
multipath Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
nop Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
part Revert revision 254095 2019-03-05 04:15:34 +00:00
raid Use g_handleattr() to reply to GEOM::candelete queries. 2019-01-02 15:52:16 +00:00
raid3 Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
sched sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
shsec Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
stripe Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
uzip Modularize xz. 2019-02-26 19:55:03 +00:00
vinum Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
virstor Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
zero Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_bsd_enc.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_bsd.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_ccd.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_ctl.c Define a constant for the maximum number of GEOM_CTL arguments. 2019-02-20 17:07:08 +00:00
geom_ctl.h Define a constant for the maximum number of GEOM_CTL arguments. 2019-02-20 17:07:08 +00:00
geom_dev.c Limit the number of entries allocated for a REPORT_ZONES command. 2019-02-19 21:33:02 +00:00
geom_disk.c geom_disk / scsi_da: deny opening write-protected disks for writing 2018-01-15 11:20:00 +00:00
geom_disk.h Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
geom_dump.c Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
geom_event.c Instrument "boot holds" for the benefit of the TSLOG framework. These 2017-12-31 09:23:52 +00:00
geom_flashmap.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_fox.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_int.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_io.c Revert r340187, it breaks EOD (end-of-device) detection logic. Turns out, 2018-11-07 16:28:09 +00:00
geom_kern.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_map.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_mbr_enc.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_mbr.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_redboot.c Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
geom_slice.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_slice.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_subr.c Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
geom_sunlabel_enc.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_sunlabel.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom_vfs.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_vfs.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
geom_vol_ffs.c Annotate geom modules with MODULE_VERSION 2018-04-10 19:18:16 +00:00
geom.h Extend stripeoffset and stripesize of GEOMs from u_int to off_t 2018-10-27 16:14:42 +00:00
notes