From owner-cvs-all Mon Jan 27 23:41:43 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24C2E37B401; Mon, 27 Jan 2003 23:41:42 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D59743E4A; Mon, 27 Jan 2003 23:41:41 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h0S7feMW062628; Mon, 27 Jan 2003 23:41:40 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id h0S7feFP055605; Mon, 27 Jan 2003 23:41:40 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id h0S7feHg055604; Mon, 27 Jan 2003 23:41:40 -0800 (PST) Date: Mon, 27 Jan 2003 23:41:40 -0800 From: Marcel Moolenaar To: phk@freebsd.org Cc: Nate Lawson , 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> References: <20030127211612.GA582@dhcp01.pn.xcllnt.net> <31451.1043735666@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31451.1043735666@critter.freebsd.dk> User-Agent: Mutt/1.5.3i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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