Date: Fri, 1 Jun 2007 06:26:14 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: freebsd-geom@FreeBSD.org Subject: Re: Difference between setting geli(8) key when attached or detached Message-ID: <20070601042614.GB1223@garage.freebsd.pl> In-Reply-To: <20070531224427.GU31507@obiwan.tataz.chchile.org> References: <20070531224427.GU31507@obiwan.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--DBIVS5p969aUjpLe Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 01, 2007 at 12:44:27AM +0200, Jeremie Le Hen wrote: > Hi Pawel, >=20 > I dare to contact you because I'm studying GELI's code and I found > a piece of code I'm not sure to understand, although I've read phk's > GEOM tutorial thoroughly. >=20 > >From what I've undertood (please, correct me if I'm wrong), a > "spoiled" event is ``posted when a provider gets a non-zero access > count. All attached providers, except the guilty party, are > notified.'' s/non-zero access count/non-zero write access count/ Here is the thing. When your class makes decisions based on provider's on-disk metadata, you want to receive spoil event and self-destruct, because open for write means that someone may modify your metadata. Then, on last write close, taste event is send and your class can read eventually modified metadata once again. > geli(8)'s "setkey" command uses two different code paths, depending > on whether the provider is attached or not. If is it attached, > it seems to use the GEOM kernel part to update the key while > if it is detached it writes it directly from userland. >=20 > My thought is that the provider being modified is not notified > by the GEOM framework. Am I right? GELI doesn't do autoconfiguration. The only place when GELI uses taste event is before root file system is mounted, so it can ask for a passphrase when needed. Not sure if this answers your question... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --DBIVS5p969aUjpLe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGX5/mForvXbEpPzQRAjYgAKDqgxKaYPEekLIHsFR818K/jfUhYACgg9LM 0eJB9oQZoROXD3GeaW4T2GI= =yiLg -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070601042614.GB1223>