summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2011-06-21 04:06:39 +0000
committerae <ae@FreeBSD.org>2011-06-21 04:06:39 +0000
commit8e166a461cb07c7f1e283eaeb4013edcaaccad09 (patch)
tree959dae84943c1851d5a07d7b4ff58d9c32923da4 /sbin
parente42b865a6d703440347be5d80a4d97f4ec740c20 (diff)
downloadFreeBSD-src-8e166a461cb07c7f1e283eaeb4013edcaaccad09.zip
FreeBSD-src-8e166a461cb07c7f1e283eaeb4013edcaaccad09.tar.gz
The "size" param needs no adjusting to stripeoffset.
Reported by: Kris Moore
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/part/geom_part.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c
index eaf5845..a6840e2 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);
OpenPOWER on IntegriCloud