From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] libdlm dlm_ls_lock_wait() doesn't.
Date: Thu, 20 Mar 2008 09:39:02 -0500 [thread overview]
Message-ID: <20080320143902.GA20088@redhat.com> (raw)
In-Reply-To: <20080319223511.GB23815@mail.oracle.com>
On Wed, Mar 19, 2008 at 03:35:11PM -0700, Joel Becker wrote:
> Folks,
> Another problem I've run into with libdlm - call
> dlm_ls_lock_wait() on a lock that another node holds, and it returns
> instead of blocking. This is not a trylock (LKF_NOQUEUE). Trylocks
> work as expected. A blocking lock attempt does not block, it just
> fails. I haven't had the time to nail it yet, so if you get there
> first, excellent.
I've tested both threaded and non-threaded dlm_ls_lock_wait() and they
seem to work for me. A mistake that I got hung up on for a while was that
a non-threaded program must link against libdlm_lt, not libdlm.
So, a threaded program needs: -D_REENTRANT -lpthread -ldlm
and a non-threaded program needs: -ldlm_lt
Also, in a threaded program, you need to call dlm_ls_pthread_init(handle);
right after creating the lockspace. I'm not sure what the symptoms would
be if you left out the pthread_init(). The symptoms when I mistakenly
linked my non-threaded program with libdlm were that dlm_ls_lock_wait()
didn't return at all.
next prev parent reply other threads:[~2008-03-20 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 22:35 [Cluster-devel] libdlm dlm_ls_lock_wait() doesn't Joel Becker
2008-03-20 14:39 ` David Teigland [this message]
2008-03-20 21:45 ` Joel Becker
2008-03-20 22:20 ` Joel Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080320143902.GA20088@redhat.com \
--to=teigland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).