From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiaju Zhang Date: Wed, 26 Aug 2009 14:54:11 +0800 Subject: [Cluster-devel] Re: [RFC]Drop unused plock resource when no other plock request comes In-Reply-To: <20090825153503.GA24475@redhat.com> References: <20090824143128.GA25798@redhat.com> <20090825153503.GA24475@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Aug 25, 2009 at 11:35 PM, David Teigland wrote: > On Tue, Aug 25, 2009 at 11:10:03AM +0800, Jiaju Zhang wrote: > > On Mon, Aug 24, 2009 at 10:31 PM, David Teigland >wrote: > > > > > > > > You're correct; yes the daemon could easily be changed to drop > resources > > > when > > > there's no locking activity. We'd just set a poll timeout when > > > plock_resources is non-empty and call drop_resources() if it times out. > > > > > > (If you simply want to work around this, you can write a little program > to > > > lock a file on the fs to trigger the drop.) > > > > > > Dave > > > > > > Many thanks for your guidance :-) > > So I write a patch to try to fix this. Review and comments are welcome. > > Thanks, that looks like it would do the job, but the code is a little > complicated. Here's a simpler patch, I've not tried it so it may not work > :) > The code is so elegant and it works fine :) Thanks, Jiaju -------------- next part -------------- An HTML attachment was scrubbed... URL: