diff options
-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 */ |