From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Massimo Di Nitto Date: Thu, 08 Nov 2007 17:05:49 -0500 Subject: [Cluster-devel] RFC: cman_wait_init rework Message-ID: <4733883D.7000803@ubuntu.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi guys, I just spotted one major issue with the basic implementation of cman_wait_init. Basically we don't provide the user any kind of information about the status and this is bad IMHO. So I have been thinking a bit about it and I see 2 solutions to the problem: One is to just revert the original patch and let the clients use the actual code for cman_init and cman_admin_init. Two is to complete cman_wait_init with something similar to the patch in attachment. As an example I have converted qdisk to use it (patch is untested and qdisk is kind of a special case because it retains backwards compatibility with older versions of cman, so look at it in the full context of the code). You can see that the code is generally simplified and the client can retain as much control as they want. The basic idea is to provide the option to hook two (optionals) callbacks that are invoked in each loop (waiting for cman or quorum). If we will go this route, i want to extend this patch to allow the callbacks to either modify/reset the loops or return some values to break the loops. Cheers Fabio -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cman_wait.diff URL: