From 8d60cb601f02453f8810921c1690468de9f28bee Mon Sep 17 00:00:00 2001 From: ae Date: Thu, 26 Feb 2015 15:59:45 +0000 Subject: 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 --- sbin/geom/class/part/geom_part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index ee4b2a9..8416954 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -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) { -- cgit v1.1