Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2015 15:59:46 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279324 - head/sbin/geom/class/part
Message-ID:  <201502261559.t1QFxktJ067454@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Thu Feb 26 15:59:45 2015
New Revision: 279324
URL: https://svnweb.freebsd.org/changeset/base/279324

Log:
  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
  MFC after:	1 week

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 Feb 26 15:48:20 2015	(r279323)
+++ head/sbin/geom/class/part/geom_part.c	Thu Feb 26 15:59:45 2015	(r279324)
@@ -561,7 +561,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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502261559.t1QFxktJ067454>