svn commit: r222631 - head/sbin/geom/class/part
Andrey V. Elsukov
ae at FreeBSD.org
Thu Jun 2 22:15:20 UTC 2011
Author: ae
Date: Thu Jun 2 22:15:19 2011
New Revision: 222631
URL: http://svn.freebsd.org/changeset/base/222631
Log:
Always use LCM when stripesize > 0.
Modified:
head/sbin/geom/class/part/geom_part.c
Modified: head/sbin/geom/class/part/geom_part.c
==============================================================================
--- head/sbin/geom/class/part/geom_part.c Thu Jun 2 21:59:21 2011 (r222630)
+++ head/sbin/geom/class/part/geom_part.c Thu Jun 2 22:15:19 2011 (r222631)
@@ -342,7 +342,7 @@ gpart_autofill_resize(struct gctl_req *r
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 */
More information about the svn-src-all
mailing list