From owner-freebsd-geom@FreeBSD.ORG Wed Apr 27 14:27:04 2011 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 3F712106566B; Wed, 27 Apr 2011 14:27:04 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 01D738FC16; Wed, 27 Apr 2011 14:27:03 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 2925E58135; Wed, 27 Apr 2011 09:01:32 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id 0NEr0dBqqJ7H; Wed, 27 Apr 2011 09:01:32 -0500 (CDT) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-127.icecube.wisc.edu [172.16.223.127]) by mail.icecube.wisc.edu (Postfix) with ESMTP id F050D5811A; Wed, 27 Apr 2011 09:01:31 -0500 (CDT) Message-ID: <4DB821BB.6020006@freebsd.org> Date: Wed, 27 Apr 2011 09:01:31 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Andrey V. Elsukov" References: <4DB54F40.8050608@FreeBSD.org> <4DB7C7B7.9020201@FreeBSD.org> In-Reply-To: <4DB7C7B7.9020201@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcel Moolenaar , FreeBSD Current , Pawel Jakub Dawidek , freebsd-geom@FreeBSD.org Subject: Re: A replacement for GEOM_LABEL's gpt/gptid 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: Wed, 27 Apr 2011 14:27:04 -0000 On 04/27/11 02:37, Andrey V. Elsukov wrote: > On 25.04.2011 14:38, Andrey V. Elsukov wrote: >> I wrote a small extension for the GEOM_PART class. It adds an ability >> to GEOM_PART class to create partition labels for schemes which are >> support them. >> >> Currently we have GEOM_LABEL class which does similar functions, >> but it has problems in conjunction with GEOM_PART (e.g. kern/154226). >> Current implementation of GEOM_LABEL's gpt/gptid module does direct >> access to GEOM_PART object structures, that seems not so good for me. >> >> So, my patch contains: >> >> * new GEOM class "PART::LABEL". It attaches to partition provider and >> create new providers for each label. >> >> * new kobj method - G_PART_LABELS. It called when new partition is creating. >> A partition scheme can implement this method if it supports partition labels. >> Method should just call g_part_create_label() function to create new label for >> given partition. >> >> * g_part_spoil_labels() function. It called from GEOM_PART to destroy labels >> providers or mark them stale. At this time it called only from "gpart modify" >> method. >> >> What differs from GEOM_LABEL: >> >> * PART::LABEL class has not ".spoiled" method and all providers are persistent. >> >> * if label is changing while provider is in use, it will not be destroyed until >> access does not released, but new label will become available. >> >> * also it has support for APM and PC98 schemes. >> >> The patch is here: >> http://people.freebsd.org/~ae/gpart_labels.diff > > I updated the patch, it is in the same location. > I turned off glabel's gpt/gpid support and added loader tunables: > > kern.geom.part_label.apm.enable > kern.geom.part_label.gpt.enable > kern.geom.part_label.gptid.enable > kern.geom.part_label.pc98.enable > > Also for compatibility glabel's tunables still here: > > kern.geom.label.gpt.enable > kern.geom.label.gptid.enable > > So, if you have them in your loader.conf and want to have gpt/gptid labels, > you should remove them from loader.conf. > Also now they are only loader tunables and they can not be changed in runtime. > > If there will no objections i am planning to commit patch in this weekend. > This is fantastic. Thank you! -Nathan