From owner-freebsd-current@FreeBSD.ORG Wed Jul 6 16:58:29 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A294516A41C; Wed, 6 Jul 2005 16:58:29 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from www.portaone.com (web.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17F2A43D48; Wed, 6 Jul 2005 16:58:28 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.19] (lesnik.portaone.com [195.140.246.50]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id j66GwQ8b033582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Jul 2005 18:58:27 +0200 (CEST) (envelope-from sobomax@portaone.com) Message-ID: <42CC0DAF.20401@portaone.com> Date: Wed, 06 Jul 2005 19:58:23 +0300 From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Poul-Henning Kamp References: <5611.1120646824@phk.freebsd.dk> In-Reply-To: <5611.1120646824@phk.freebsd.dk> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.83/970/Wed Jul 6 18:00:45 2005 on www.portaone.com X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.ORG, Giorgos Keramidas Subject: Re: [TEST/REVIEW] boot0cfg/fdisk issue fix X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maxim.Sobolev@portaone.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 16:58:29 -0000 Poul-Henning Kamp wrote: > In message <20050706103934.GE25722@beatrix.daedalusnetworks.priv>, Giorgos Kera > midas writes: > > >>Yes, please. Right now, there are times that sysinstall breaks in funny >>ways when changes are made to the partition table of a disk. The bug >>usually shows up when one hits 'w' instead of 'q' in the slice editor. > > > This patch does not change sysinstall, but the changes can be incorporated > by anyone with a bit of time. I wonder if there cound be a "better" fix. IMHO the better one would be to extend geom/geom_mbr to intercept attempt to rewrite MBR, check if in the new MBR any of the opened partitions have been changed/removed and simply reject write if so. Then you don't have to change any of the existing programs that operate on MBR. Another good feature to have is the ability to tell geom_mbr/geom_bsd (via sysctl or ioctl) to make in-core copy of the table/label and release any locks it helds on this region, so that it can be replaced with completely different version if needed via simple write(2). The same applies to the disklabel class. This is really necessary for some cases, when the user or the program know he/is trying to do. -Maxim