From owner-freebsd-current@FreeBSD.ORG Wed Apr 27 08:07:43 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA260106566B for ; Wed, 27 Apr 2011 08:07:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mgat.kirov.so-cdu.ru (mgat.kirov.so-cdu.ru [77.72.136.147]) by mx1.freebsd.org (Postfix) with ESMTP id 1FA9E8FC12 for ; Wed, 27 Apr 2011 08:07:42 +0000 (UTC) Received: from kirov.so-cdu.ru ([172.21.81.1]RDNS failed) by mgat.kirov.so-cdu.ru with InterScan Message Security Suite; Wed, 27 Apr 2011 11:37:34 +0400 Received: by ns.kirov.so-cdu.ru (Postfix, from userid 1010) id DB73CB83C3; Wed, 27 Apr 2011 11:37:31 +0400 (MSD) Received: from [10.118.3.52] (elsukov.kirov.oduur.so [10.118.3.52]) by ns.kirov.so-cdu.ru (Postfix) with ESMTP id A5E85B83C0; Wed, 27 Apr 2011 11:37:31 +0400 (MSD) Message-ID: <4DB7C7B7.9020201@FreeBSD.org> Date: Wed, 27 Apr 2011 11:37:27 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: FreeBSD Current References: <4DB54F40.8050608@FreeBSD.org> In-Reply-To: <4DB54F40.8050608@FreeBSD.org> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigECC850959DAEF3EE0F265E6A" Cc: Marcel Moolenaar , Pawel Jakub Dawidek , freebsd-geom@FreeBSD.org Subject: Re: A replacement for GEOM_LABEL's gpt/gptid X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 08:07:44 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigECC850959DAEF3EE0F265E6A Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > So, my patch contains: >=20 > * new GEOM class "PART::LABEL". It attaches to partition provider and > create new providers for each label. >=20 > * new kobj method - G_PART_LABELS. It called when new partition is crea= ting. > A partition scheme can implement this method if it supports partition l= abels. > Method should just call g_part_create_label() function to create new la= bel for > given partition. >=20 > * g_part_spoil_labels() function. It called from GEOM_PART to destroy l= abels > providers or mark them stale. At this time it called only from "gpart m= odify" > method. >=20 > What differs from GEOM_LABEL: >=20 > * PART::LABEL class has not ".spoiled" method and all providers are per= sistent. >=20 > * if label is changing while provider is in use, it will not be destroy= ed until > access does not released, but new label will become available. >=20 > * also it has support for APM and PC98 schemes. >=20 > 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 label= s, you should remove them from loader.conf. Also now they are only loader tunables and they can not be changed in run= time. If there will no objections i am planning to commit patch in this weekend= =2E --=20 WBR, Andrey V. Elsukov --------------enigECC850959DAEF3EE0F265E6A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJNt8e7AAoJEAHF6gQQyKF6QncH/01c8e2+1Cq7Mp+D1NFKhHvn oGH6/iFLZ/Npo/5dBTCTTHxR2Fj8Yerxi5Akdlw6xel7FcAMHCBU1o/HuuPOtrqk c59lgLDX0qFF/7Sj9O5V8mScKWFtqQO4tCro0D2ZhO9jytbcbGOdXrdwSpUTfBrZ H9PihrWlOvKoXWqaUCZKqQUZ/X8qVxc7Sowr+IIm2UGDTjGB7Kb4nqp+7O/H5wda GD4y/vRQCAF8Ram2X7mGo5/Zznu/WY0qYN4J5w3CeTrucIKzMa2RqCFppbrN/VIn in1V07tj9wFqd9eBy+FWIjJn2nMxPdydJM5uvRQsq5cpblebASDoGhE2KLz7qD8= =plfE -----END PGP SIGNATURE----- --------------enigECC850959DAEF3EE0F265E6A--