Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2011 23:58:53 +0400
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        Kris Moore <kris@pcbsd.org>
Cc:        freebsd-geom@FreeBSD.ORG
Subject:   Re: gpart sizes way off
Message-ID:  <4DFFA67D.2010305@FreeBSD.org>
In-Reply-To: <4DFF97DF.5040408@pcbsd.org>
References:  <4DFF8611.4090705@pcbsd.org> <4DFF8DC6.1010701@FreeBSD.org> <4DFF97DF.5040408@pcbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040408000900090507080007
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 7bit

On 20.06.2011 22:56, Kris Moore wrote:
> Here you go!
> # gpart list

Hi,

thank you for the report. It's my fail. Can you test attached patch?

-- 
WBR, Andrey V. Elsukov

--------------040408000900090507080007
Content-Type: text/plain;
 name="gpart.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="gpart.diff"

Index: head/sbin/geom/class/part/geom_part.c
===================================================================
--- head/sbin/geom/class/part/geom_part.c	(revision 223335)
+++ head/sbin/geom/class/part/geom_part.c	(working copy)
@@ -500,7 +500,7 @@ gpart_autofill(struct gctl_req *req)
 	offset = pp->lg_stripeoffset / pp->lg_sectorsize;
 	start = ALIGNUP(start + offset, alignment);
 	if (size + offset > alignment)
-		size = ALIGNDOWN(size + offset, alignment);
+		size = ALIGNDOWN(size + offset, alignment) - offset;
 
 	first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0);
 	last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);

--------------040408000900090507080007--



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