From 621f3e6d9ca3ccd2a68347ed40d2b988ab1c8c23 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Tue, 21 Jun 2011 04:06:39 +0000 Subject: [PATCH] The "size" param needs no adjusting to stripeoffset. Reported by: Kris Moore --- sbin/geom/class/part/geom_part.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index eaf58450166d..a6840e2a0e13 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -499,8 +499,8 @@ gpart_autofill(struct gctl_req *req) /* Adjust parameters to stripeoffset */ offset = pp->lg_stripeoffset / pp->lg_sectorsize; start = ALIGNUP(start + offset, alignment); - if (size + offset > alignment) - size = ALIGNDOWN(size + offset, alignment); + if (size > alignment) + size = ALIGNDOWN(size, alignment); first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0); last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);