From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 00:00:22 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8938106564A for ; Mon, 22 Aug 2011 00:00:22 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id AB56F8FC15 for ; Mon, 22 Aug 2011 00:00:22 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LQA00100YOL5O00@smtpauth2.wiscmail.wisc.edu> for freebsd-current@freebsd.org; Sun, 21 Aug 2011 19:00:21 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.68.180]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LQA00AQEYOKLB30@smtpauth2.wiscmail.wisc.edu>; Sun, 21 Aug 2011 19:00:21 -0500 (CDT) Date: Sun, 21 Aug 2011 19:00:19 -0500 From: Nathan Whitehorn In-reply-to: <64622705-80AB-4FEF-91E9-8F3041818B4E@xcllnt.net> To: Marcel Moolenaar Message-id: <4E519C13.4060700@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.68.180 X-Spam-PmxInfo: Server=avs-9, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.8.21.235114, SenderIP=76.210.68.180 References: <4E4DB9A7.4040404@freebsd.org> <4E517978.2020705@freebsd.org> <64622705-80AB-4FEF-91E9-8F3041818B4E@xcllnt.net> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0) Gecko/20110819 Thunderbird/6.0 Cc: Garrett Cooper , freebsd-current@freebsd.org Subject: Re: Well, there goes Windows! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 00:00:22 -0000 On 08/21/11 18:11, Marcel Moolenaar wrote: > On Aug 21, 2011, at 2:32 PM, Nathan Whitehorn wrote: >> gpart does not support (well, anyway) changing the underlying partition table format without committing changes. Replacing the partition scheme, which this does, is such an operation. > Weird. I could always destroy tables, create new ones using a > different scheme and populate it with partitions without there > being a single write to disk. The commit/undo logic worked > just as well for those operations as the simpler ones. Did that > get broken or are you just mistaken? > No, it's stupider than that. When you destroy a gpart without committing, the GEOM itself lingers as a (none)-type partitioning. This of course makes sense, since that ghost geom is what is maintaining all the state, but sometimes causes problems. For instance, it breaks some of my lazy code that identifies non-partitioned disks by seeing if there is a GEOM there. But, while slightly more complicated to detect, this would not be too difficult to fix. The larger problem is that this behavior means that destroying gparts sometimes doesn't work at all. For instance, if you have nested partitioning like MBR+BSD (or EBR) it is not possible to destroy the underlying MBR geom without committing the destruction of the BSD geom. This is because the MBR geom cannot be destroyed, even without committing, while it continues to have children, which it does due to the ghost geom for the BSD slice. The regular partitioning editor only commits early in this particular case, and asks about each subpartition tree separately with a big scary dialog box. In the spirit of the autopartitioner, it makes one large scary dialog, and always runs in early commit mode instead of potentially showing many scary dialogs about partitions the user doesn't necessarily even know about. This behavior could be changed, but I think is the most friendly for the case in question: namely, "I want to blow away everything and let the installer handle all partitioning details by itself". -Nathan