The "size" param needs no adjusting to stripeoffset.

Reported by:	Kris Moore
This commit is contained in:
Andrey V. Elsukov 2011-06-21 04:06:39 +00:00
parent 24c02d2f9e
commit 621f3e6d9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223355

View File

@ -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);