Author: ae
Date: Tue Jun 21 04:06:39 2011
New Revision: 223355
URL: http://svn.freebsd.org/changeset/base/223355

Log:
  The "size" param needs no adjusting to stripeoffset.
  
  Reported by:  Kris Moore

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       Tue Jun 21 03:42:00 2011        
(r223354)
+++ head/sbin/geom/class/part/geom_part.c       Tue Jun 21 04:06:39 2011        
(r223355)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to