On Tue, Aug 25, 2009 at 11:35 PM, David Teigland <span dir="ltr"><<a href="mailto:teigland@redhat.com">teigland@redhat.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, Aug 25, 2009 at 11:10:03AM +0800, Jiaju Zhang wrote:<br>
> On Mon, Aug 24, 2009 at 10:31 PM, David Teigland <<a href="mailto:teigland@redhat.com">teigland@redhat.com</a>>wrote:<br>
><br>
> ><br>
> > You're correct; yes the daemon could easily be changed to drop resources<br>
> > when<br>
> > there's no locking activity.  We'd just set a poll timeout when<br>
> > plock_resources is non-empty and call drop_resources() if it times out.<br>
> ><br>
> > (If you simply want to work around this, you can write a little program to<br>
> > lock a file on the fs to trigger the drop.)<br>
> ><br>
> > Dave<br>
><br>
><br>
> Many thanks for your guidance :-)<br>
> So I write a patch to try to fix this. Review and comments are welcome.<br>
<br>
</div>Thanks, that looks like it would do the job, but the code is a little<br>
complicated.  Here's a simpler patch, I've not tried it so it may not work :)<br>
</blockquote></div><br>The code is so elegant and it works fine :)<br><br>Thanks,<br>Jiaju<br><br>