From owner-svn-src-all@FreeBSD.ORG Sun Apr 25 01:56:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBAB106576C; Sun, 25 Apr 2010 01:56:41 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB878FC17; Sun, 25 Apr 2010 01:56:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3P1udbc011273; Sun, 25 Apr 2010 01:56:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3P1ud0K011271; Sun, 25 Apr 2010 01:56:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004250156.o3P1ud0K011271@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 25 Apr 2010 01:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207181 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2010 01:56:41 -0000 Author: marcel Date: Sun Apr 25 01:56:39 2010 New Revision: 207181 URL: http://svn.freebsd.org/changeset/base/207181 Log: Re-calculate a geometry when reprobing as well. PR: kern/145452 Reported by: "Andrey V. Elsukov" Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sun Apr 25 01:56:31 2010 (r207180) +++ head/sys/geom/part/g_part.c Sun Apr 25 01:56:39 2010 (r207181) @@ -1166,6 +1166,15 @@ g_part_ctl_undo(struct gctl_req *req, st return (0); } table = gp->softc; + + /* + * Synthesize a disk geometry. Some partitioning schemes + * depend on it and since some file systems need it even + * when the partitition scheme doesn't, we do it here in + * scheme-independent code. + */ + pp = cp->provider; + g_part_geometry(table, cp, pp->mediasize / pp->sectorsize); } error = G_PART_READ(table, cp);