Author: ae
Date: Thu Mar  5 10:07:09 2015
New Revision: 279645
URL: https://svnweb.freebsd.org/changeset/base/279645

Log:
  MFC r279324:
    When gpart(8) is trying automatically determine the first available
    block of free space after existing partition, take into account
    provider's stripeoffset, since the result will be adjusted to this
    value.
  
    PR:         197989

Modified:
  stable/9/sbin/geom/class/part/geom_part.c
Directory Properties:
  stable/9/sbin/geom/class/part/   (props changed)

Modified: stable/9/sbin/geom/class/part/geom_part.c
==============================================================================
--- stable/9/sbin/geom/class/part/geom_part.c   Thu Mar  5 10:04:34 2015        
(r279644)
+++ stable/9/sbin/geom/class/part/geom_part.c   Thu Mar  5 10:07:09 2015        
(r279645)
@@ -550,7 +550,7 @@ gpart_autofill(struct gctl_req *req)
 
                s = find_provcfg(pp, "end");
                first = (off_t)strtoimax(s, NULL, 0) + 1;
-               if (first > a_first)
+               if (first + offset > a_first)
                        a_first = ALIGNUP(first + offset, alignment);
        }
        if (a_first <= last) {
_______________________________________________
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