From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] clvmd: closedown the cluster after finishing of lvm_thread
Date: Thu, 28 Nov 2013 14:57:59 +0100 [thread overview]
Message-ID: <52974BE7.1080206@redhat.com> (raw)
In-Reply-To: <1385542604-11708-1-git-send-email-dmzhang@suse.com>
Dne 27.11.2013 09:56, dongmao zhang napsal(a):
> when lvm_thread is processing remote request, the clvmd
> received a SIG_TERM, it will free cluster resource before
> the realwork of lvm_thread is done. If freeing the cluster
> resource happens before send_message, it would cause the
> remote command hangs forever.
>
> this patch move closedown after the closing the working thread.
> ---
> daemons/clvmd/clvmd.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
> index d57c0fd..b2f7dd5 100644
> --- a/daemons/clvmd/clvmd.c
> +++ b/daemons/clvmd/clvmd.c
> @@ -621,6 +621,8 @@ int main(int argc, char *argv[])
> if ((errno = pthread_join(lvm_thread, NULL)))
> log_sys_error("pthread_join", "");
>
> + clops->cluster_closedown();
> +
> close_local_sock(local_sock);
> destroy_lvm();
>
> @@ -979,7 +981,6 @@ static void main_loop(int local_sock, int cmd_timeout)
> }
>
> closedown:
> - clops->cluster_closedown();
> if (quit)
> DEBUGLOG("SIGTERM received\n");
> }
It's not clear to me how this code move helps to anything.
You just moved call of clops->cluster_closedown(); after joining thread?
In which code path this patch is changing something ?
Zdenek
next prev parent reply other threads:[~2013-11-28 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 8:56 [PATCH] clvmd: closedown the cluster after finishing of lvm_thread dongmao zhang
2013-11-28 13:57 ` Zdenek Kabelac [this message]
2013-11-29 6:06 ` dongmao zhang
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=52974BE7.1080206@redhat.com \
--to=zkabelac@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.