From: Petr Rockai <prockai@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] (DRAFT!) Fix a deadlock in CLVMD (possibly related to BZ 561226).
Date: Wed, 20 Oct 2010 15:03:04 +0200 [thread overview]
Message-ID: <87wrpd9fuf.fsf@twilight.int.mornfall.net.> (raw)
In-Reply-To: <4CBEC730.4020906@redhat.com> (Milan Broz's message of "Wed, 20 Oct 2010 12:40:48 +0200")
Milan Broz <mbroz@redhat.com> writes:
> p.s.
> nitpicking
>
> DEBUGLOG("in sub thread: client = %p\n", client);
> + pthread_mutex_lock(&client->bits.localsock.mutex);
>
> /* Don't start until the LVM thread is ready */
> pthread_mutex_lock(&lvm_start_mutex);
> pthread_mutex_unlock(&lvm_start_mutex);
> DEBUGLOG("Sub thread ready for work.\n");
>
>
> Can we move that localsock.muext lock after the lvm_start_mutex exercise?
> (Which I do not like either - isn't cond wait better for that?)
I would be actually wary about that -- I suspect that going the other
way around could introduce a (very slight) race condition. Not that it
would ever happen in practice, but still. On the other hand, I didn't
try too hard to think about it, so I might be wrong.
Yours,
Petr.
next prev parent reply other threads:[~2010-10-20 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-18 17:17 [PATCH] (DRAFT!) Fix a deadlock in CLVMD (possibly related to BZ 561226) Petr Rockai
2010-10-18 19:54 ` Petr Rockai
2010-10-20 10:40 ` Milan Broz
2010-10-20 13:03 ` Petr Rockai [this message]
2010-10-20 13:30 ` Milan Broz
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=87wrpd9fuf.fsf@twilight.int.mornfall.net. \
--to=prockai@redhat.com \
--cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.