diff options
author | ae <ae@FreeBSD.org> | 2011-06-02 22:15:19 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2011-06-02 22:15:19 +0000 |
commit | baefb12fee69476af3fe306154cefc7c83b715c4 (patch) | |
tree | 7efdd38984cf1727b3d74bb8537a1218ec5b7962 /sbin | |
parent | 401a1d9956a1dbe5ec3331db6955b55800ce73b0 (diff) | |
download | FreeBSD-src-baefb12fee69476af3fe306154cefc7c83b715c4.zip FreeBSD-src-baefb12fee69476af3fe306154cefc7c83b715c4.tar.gz |
Always use LCM when stripesize > 0.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/class/part/geom_part.c | 4 |
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 a433a0f..ae9f4b7 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -342,7 +342,7 @@ gpart_autofill_resize(struct gctl_req *req) if (alignment == 0) errx(EXIT_FAILURE, "Invalid alignment param"); lba = pp->lg_stripesize / pp->lg_sectorsize; - if (lba % alignment) + if (lba > 0) alignment = g_lcm(lba, alignment); } error = gctl_delete_param(req, "alignment"); @@ -496,7 +496,7 @@ gpart_autofill(struct gctl_req *req) * Use LCM from stripesize and user specified alignment. */ len = pp->lg_stripesize / pp->lg_sectorsize; - if (len % alignment) + if (len > 0 ) alignment = g_lcm(len, alignment); /* Adjust parameters to stripeoffset */ |