Date: Mon, 25 Apr 2011 14:38:56 +0400 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: freebsd-geom@FreeBSD.org Cc: Marcel Moolenaar <marcel@FreeBSD.org>, Pawel Jakub Dawidek <pjd@FreeBSD.org> Subject: A replacement for GEOM_LABEL's gpt/gptid Message-ID: <4DB54F40.8050608@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DB54F40.8050608>