gpart sizes way off
Andrey V. Elsukov
ae at FreeBSD.org
Mon Jun 20 19:59:03 UTC 2011
On 20.06.2011 22:56, Kris Moore wrote:
> Here you go!
> # gpart list
Hi,
thank you for the report. It's my fail. Can you test attached patch?
--
WBR, Andrey V. Elsukov
-------------- next part --------------
Index: head/sbin/geom/class/part/geom_part.c
===================================================================
--- head/sbin/geom/class/part/geom_part.c (revision 223335)
+++ head/sbin/geom/class/part/geom_part.c (working copy)
@@ -500,7 +500,7 @@ gpart_autofill(struct gctl_req *req)
offset = pp->lg_stripeoffset / pp->lg_sectorsize;
start = ALIGNUP(start + offset, alignment);
if (size + offset > alignment)
- size = ALIGNDOWN(size + offset, alignment);
+ size = ALIGNDOWN(size + offset, alignment) - offset;
first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0);
last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
More information about the freebsd-geom
mailing list