From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: Re: Xen scripts rewrite Date: Thu, 01 Mar 2012 14:35:07 +0100 Message-ID: <4F4F7B0B.5000808@invisiblethingslab.com> References: <20120301124243.9B202298942@mx1.internecto.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4933691852424815671==" Return-path: In-Reply-To: <20120301124243.9B202298942@mx1.internecto.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mark Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============4933691852424815671== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCFED8864175D4A253BC90238" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCFED8864175D4A253BC90238 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01.03.2012 13:38, Mark wrote: > Greetings, >=20 > I am trying to wrap my head around the xen scripts in /etc/xen/scripts.= > I am currently looking at locking.sh but I don't really understand what= > it is doing. >=20 > I see that claim_lock has a while loop, it seems to wait until it can > write its own PID to $lockdir/owner. If the file $lockdir/owner exists,= > check if the pid is still running. If it's still running when the > loop is done, steal the lock by writing $$ to $lockdir/owner anyway. >=20 > Anyway. Can someone please further explain this file in plain English > and detail. Am I right with my above assumptions, and when are locks > even used? >=20 > As said, I request as much detail as possible - the rewrite is to > improve efficiency, readability and user customisation. As it is now > you have too much functions that confuse me silly. >=20 > If I am succesful I will share the outcome, so there's an incentive if > you need one. Current locking mechanism have some problems. I've written about it here:= http://lists.xen.org/archives/html/xen-devel/2011-07/msg00182.html --=20 Best Regards / Pozdrawiam, Marek Marczykowski Invisible Things Lab --------------enigCFED8864175D4A253BC90238 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.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPT3sLAAoJENuP0xzK19cs2OYH/iijHgqfL6QlHHso9nv1Uxo0 2gVaFLtPo3BmAI7EdSza+af6Q9k0hYDmt8aroltgRKcaogQulKeCQ7o8VhQvW+HU d5xbwMCgiSsquJex7tglrStlh3BObdAtsrbg3fQiPy8416754Gcs1RMH1T0qNipL YdMjFLOsfDL8742am3F41A1lAEQSqGW8mlVmryC6IGZ0KmlF9TnL706nBl/kvVgF Zwa5PZPFjvuzejL49DlDXPmDXYrzvKaTzHlpTM9Jt0zjFAIXGlM/6wXONUVUbfPk hMwTmCYhTuRoRMkc5cPcsWuUaHNVkGsfTBcthju3c/W6HM0JiKneT2M+1twk/Gk= =pwAq -----END PGP SIGNATURE----- --------------enigCFED8864175D4A253BC90238-- --===============4933691852424815671== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4933691852424815671==--