From owner-freebsd-geom@FreeBSD.ORG Mon Apr 25 11:09:13 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 34A201065690; Mon, 25 Apr 2011 11:09:13 +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 1BBB98FC2B; Mon, 25 Apr 2011 11:09:11 +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; Mon, 25 Apr 2011 14:39:02 +0400 Received: by ns.kirov.so-cdu.ru (Postfix, from userid 1010) id DF494B83BF; Mon, 25 Apr 2011 14:39:00 +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 AAD47B83B6; Mon, 25 Apr 2011 14:39:00 +0400 (MSD) Message-ID: <4DB54F40.8050608@FreeBSD.org> Date: Mon, 25 Apr 2011 14:38:56 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: freebsd-geom@FreeBSD.org X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF091C3DBBB11D917CEC733D8" Cc: Marcel Moolenaar , Pawel Jakub Dawidek Subject: 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: Mon, 25 Apr 2011 11:09:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF091C3DBBB11D917CEC733D8 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Hello All. 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 creati= ng. A partition scheme can implement this method if it supports partition lab= els. Method should just call g_part_create_label() function to create new labe= l for given partition. * g_part_spoil_labels() function. It called from GEOM_PART to destroy lab= els providers or mark them stale. At this time it called only from "gpart mod= ify" method. What differs from GEOM_LABEL: * PART::LABEL class has not ".spoiled" method and all providers are persi= stent. * 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 Since it conflicts with GEOM_LABEL's gpt/gptid to test patch you should disable gpt/gptid module, it can be done via loader.conf: kern.geom.label.gptid.enable=3D"0" kern.geom.label.gpt.enable=3D"0" --=20 WBR, Andrey V. Elsukov --------------enigF091C3DBBB11D917CEC733D8 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) iQEcBAEBAgAGBQJNtU9EAAoJEAHF6gQQyKF6PTMH/18ZHHi9FHj8gO38LUEEDC34 Cyh+nQ8Y8Q0WjMV1TKom/3wtV+OgGU/lqkSCFKZgJTvlq4PLCVCgyB/KNoD6y2E6 CLFtFm9Y8G8bmY3FTKc2fTtkZSf8u8vF/RQV2pRtzhh28YiUwwBbar9/gzOLnaeS oQ8/8+b54jPdvGVUiPFW5nXmUd+AntZ4LQIpYJzZl6dprgHF2e2fHBpJzJ8V8V/f BT5pT9WZAM+vUdMTjqz4reXC23EbsCGQbBwVJdYFkf9tt9fiE5aZgT+DCNvKpNni 2D3mbfZYCD1XTi6IdHC01EIKMzGEp/lTcessofpz66kZjRVio2qsPNy4vPc64O0= =Sj/A -----END PGP SIGNATURE----- --------------enigF091C3DBBB11D917CEC733D8--