summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2015-03-05 10:08:37 +0000
committerae <ae@FreeBSD.org>2015-03-05 10:08:37 +0000
commit204f9a5f7cbf2c7bf4899240128caf28d965180c (patch)
treef71314f9db248d33e200f2ff47c2fb820f6c15e0 /sbin
parent559bd2313e8f55181115eaa9d88f07e3c2346dc1 (diff)
downloadFreeBSD-src-204f9a5f7cbf2c7bf4899240128caf28d965180c.zip
FreeBSD-src-204f9a5f7cbf2c7bf4899240128caf28d965180c.tar.gz
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
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/part/geom_part.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c
index 604e659..32203f7 100644
--- a/sbin/geom/class/part/geom_part.c
+++ b/sbin/geom/class/part/geom_part.c
@@ -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) {
OpenPOWER on IntegriCloud