Date: Wed, 27 Apr 2011 11:37:27 +0400 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: FreeBSD Current <freebsd-current@FreeBSD.org> Cc: Marcel Moolenaar <marcel@FreeBSD.org>, Pawel Jakub Dawidek <pjd@FreeBSD.org>, freebsd-geom@FreeBSD.org Subject: Re: A replacement for GEOM_LABEL's gpt/gptid Message-ID: <4DB7C7B7.9020201@FreeBSD.org> In-Reply-To: <4DB54F40.8050608@FreeBSD.org> References: <4DB54F40.8050608@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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. -- WBR, Andrey V. Elsukov [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DB7C7B7.9020201>
