Date: Mon, 27 Jan 2003 23:41:40 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: phk@freebsd.org Cc: Nate Lawson <nate@root.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Updating partition information [was: Re: cvs commit: src/sbin/disklabel disklabel.c] Message-ID: <20030128074140.GA55074@athlon.pn.xcllnt.net> In-Reply-To: <31451.1043735666@critter.freebsd.dk> References: <20030127211612.GA582@dhcp01.pn.xcllnt.net> <31451.1043735666@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 28, 2003 at 07:34:26AM +0100, phk@freebsd.org wrote: > > >violation: in the above scheme, the SA is is responsible for getting > >his feet out of the way. Failure to do so results in undefined > >behaviour, including but not limited to panics, corruption and a > >wooden foot. > > Sorry, but no, that will not be the way it will work. Ok. 360 degree turn: What if we create an interface that's based on elementary operations such as add, remove, reindex, move, change. An update of the meta- data is then achieved by a sequence of these operations. Advantages are: 1. The operations are elementary, so they are easily checked. An add, when defined as the addition of a new partition, is relatively save and only needs to be checked for the availability of space and non overlap. A remove operation, when defined as the removal of an existing partition is potentionally fatal and can be disallowed when the partition is in use. 2. Elementary operations resemble database updates and thus allow features like undu and atomicity of multiple independent operations by the use of begin session/end session. This also allows for nice user interfaces. Of course this adds to the complexity... 3. It doesn't matter what the physical (on disk) representation of the partitioning scheme is, the interface is uniform. 4. It allows other apparently complex operations such as moving a mounted partition from one disk to another because all the information is centralized. This opens up the door to more advanced disk management. 5. You can easily extend the interface to have it apply to non- partitioning classes, such as encryption nodes and mirroring nodes (set new encryption key, decrypt, add disk to mirror). 6. It's stepping away from reading/writing sectors and thus allow for any kind of interface that's logical and intuitive. 7. Could be hooked up with the MAC framework to allow certain (groups of) users certain kinds of operations. 8. Allows for concurrent access. In short: create a (possibly relational) representation of the meta-data and treat it as a database that can be queried and updated. This is a raw brainwave. I haven't let it sink. Let alone draw a sketch or determined feasibility. Try it out for size, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030128074140.GA55074>