From owner-freebsd-geom@FreeBSD.ORG Thu Mar 13 14:36:17 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E18EA106567B for ; Thu, 13 Mar 2008 14:36:17 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from bene2.itea.ntnu.no (bene2.itea.ntnu.no [IPv6:2001:700:300:3::57]) by mx1.freebsd.org (Postfix) with ESMTP id D85198FC1F for ; Thu, 13 Mar 2008 14:36:16 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by bene2.itea.ntnu.no (Postfix) with ESMTP id BA98D161DFC; Thu, 13 Mar 2008 15:36:14 +0100 (CET) Received: from webmail.ntnu.no (textus11.itea.ntnu.no [129.241.56.161]) by bene2.itea.ntnu.no (Postfix) with ESMTP id BE891161DFE; Thu, 13 Mar 2008 15:35:51 +0100 (CET) Received: from u-211000159078.hotspot.ne.jp (u-211000159078.hotspot.ne.jp [211.0.159.78]) by webmail.ntnu.no (Horde MIME library) with HTTP; Thu, 13 Mar 2008 15:35:51 +0100 Message-ID: <20080313153551.82wlu8iio4088c44@webmail.ntnu.no> Date: Thu, 13 Mar 2008 15:35:51 +0100 From: lulf@stud.ntnu.no To: rick-freebsd@kiwi-computer.com References: <20080310052711.GA49676@keira.kiwi-computer.com> In-Reply-To: <20080310052711.GA49676@keira.kiwi-computer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) X-Virus-Scanned: Debian amavisd-new at bene2.itea.ntnu.no Cc: freebsd-geom@freebsd.org Subject: Re: [patch] geom_vinum platform fixes X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 14:36:18 -0000 Siterer "Rick C. Petty" : > Attached is a patch against RELENG_6 (but applies cleanly against > RELENG_7). It contains a fix to the geom_vinum platform brokenness > explained in my earlier email. Please review the patch and provide any > feedback. I will try to find a committer to review/commit this and any > subsequent changes early this week. Hello, I've spent a _lot_ of time fixing gvinum, so your previous statements =20 saying noone is fixing gvinum really is wrong :) I'm sorry this is taking so long, but there has been much time invested in 7.0 before gvinum. I'm also in Japan for another two weeks, so I won't be able to continue a discussion on this right now. But I agree with your changes, and I'll review and integrate your changes to the new code base ASAP, but this will probably not go in until the =20 new gvinum codebase iscommitted, since that will probably happen before 7.1/6.4 anywa= y -- Ulf Lilleengen > > Here is a quick overview of the patch. I've split the reading and writing > of the on-disk vinum header into separate functions. The header is read > by gv_drive_taste() and written by gv_save_config() and gv_rm_drive(). > > For reads, there are three possible on-disk formats it handles: the legac= y > i386 and legacy amd64 formats and the current (forward-going) format. The > legacy formats are distinguished by the algorithm in > gv_test_legacy_header_type(), which tests for known zeros, etc. Both > legacy formats are stored in little-endian, and this code should work on > all architectures regardless of endianness. I use a separate in-memory > structure to simplify the conversions. > > For writes, the patch only supports the new forward-going on-disk format. > This format is stored in big-endian (network order, also it's easier to > read with hexdump) and uses a new magic. This new magic value contains a > version number which I've started at 1, in case future enhancements are > made to the on-disk structure. Note that devices with old formats are > auto-upgraded when the configuration is written, which does not happen > unless "gvinum saveconfig" is used or the gvinum configuration is changed > for any reason. This lets admins keep using the old format. All new > devices added to gvinum will get the new format. > > I've tested this patch on 6.3-stable (i386) and 7.0-stable (i386, amd64) > systems, using vinum configurations created by amd64 & i386 formats and by > the new format. Other testers are welcome! > > -- Rick C. Petty >