summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2015-02-26 15:59:45 +0000
committerae <ae@FreeBSD.org>2015-02-26 15:59:45 +0000
commit8d60cb601f02453f8810921c1690468de9f28bee (patch)
treeb998adb82cd1cae1c9adac78bc12362f15d19e13 /sbin
parent263d903f0e7a4382f6349ee60bf21de068f7d926 (diff)
downloadFreeBSD-src-8d60cb601f02453f8810921c1690468de9f28bee.zip
FreeBSD-src-8d60cb601f02453f8810921c1690468de9f28bee.tar.gz
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
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 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) {
OpenPOWER on IntegriCloud