From a3cef6d48187c365e88f98ab195a6c0e93b88554 Mon Sep 17 00:00:00 2001 From: ae Date: Thu, 5 Mar 2015 10:12:28 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/8@279647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/geom/class/part/geom_part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index 78889a2db..10feabbae 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -565,7 +565,7 @@ gpart_autofill(struct gctl_req *req) (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else 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) { -- 2.45.0