Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jul 2005 19:58:23 +0300
From:      Maxim Sobolev <sobomax@portaone.com>
To:        Poul-Henning Kamp <phk@haven.freebsd.dk>
Cc:        freebsd-current@FreeBSD.ORG, Giorgos Keramidas <keramida@FreeBSD.ORG>
Subject:   Re: [TEST/REVIEW] boot0cfg/fdisk issue fix
Message-ID:  <42CC0DAF.20401@portaone.com>
In-Reply-To: <5611.1120646824@phk.freebsd.dk>
References:  <5611.1120646824@phk.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42CC0DAF.20401>