Spdk/module/bdev/gpt
Jim Harris 3a39d90b03 bdev_gpt: add new SPDK partition type for off-by-one fix
The gpt bdev module has an off-by-one error.  When it
calculates the size of the partition, it simply does
"end - start", when really it should be "end - start + 1".

We cannot just fix it by changing the math here, any
consumers of the partition may have put down metadata
on the partition based on the old size.

So instead add a new SPDK partition type.  SPDK will keep
the existing off-by-one behavior when it finds the old
partition type, but will use the correct math when finding
the new partition type.

Fixes issue #2801.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I48eb48c781f1968b59e52b4477ca45e9c81eac11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16298
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-24 17:19:35 +00:00
..
gpt.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
gpt.h bdev_gpt: add new SPDK partition type for off-by-one fix 2023-01-24 17:19:35 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
vbdev_gpt.c bdev_gpt: add new SPDK partition type for off-by-one fix 2023-01-24 17:19:35 +00:00