[Cluster-devel] Re: [RFC]Drop unused plock resource when no other plock request comes

Jiaju Zhang jjzhang.linux at gmail.com
Wed Aug 26 06:54:11 UTC 2009


On Tue, Aug 25, 2009 at 11:35 PM, David Teigland <teigland at redhat.com>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 <teigland at redhat.com
> >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: <http://listman.redhat.com/archives/cluster-devel/attachments/20090826/bee575bd/attachment.htm>


More information about the Cluster-devel mailing list