Signed-off-by: Vladislav Bogdanov <bubble@hoster-ok.com> --- daemons/clvmd/clvmd.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 4f2f458..fa09464 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -1417,7 +1417,9 @@ static int distribute_command(struct local_client *thisfd) * is set so we still get a reply if this is the * only node. */ + inheader->flags |= CLVMD_FLAG_LOCAL; add_to_lvmqueue(thisfd, inheader, len, NULL); + inheader->flags &= ~CLVMD_FLAG_LOCAL; DEBUGLOG("Sending message to all cluster nodes\n"); inheader->xid = thisfd->xid; @@ -1439,6 +1441,8 @@ static int distribute_command(struct local_client *thisfd) /* Are we the requested node ?? */ if (memcmp(csid, our_csid, max_csid_len) == 0) { DEBUGLOG("Doing command on local node only\n"); + inheader->flags &= ~CLVMD_FLAG_REMOTE; + inheader->flags |= CLVMD_FLAG_LOCAL; add_to_lvmqueue(thisfd, inheader, len, NULL); } else { DEBUGLOG("Sending message to single node: %s\n", @@ -1742,8 +1746,8 @@ static int process_local_command(struct clvm_header *msg, int msglen, if (replybuf == NULL) return -1; - /* If remote flag is set, just set a successful status code. */ - if (msg->flags & CLVMD_FLAG_REMOTE) + /* If local flag is not set, just set a successful status code. */ + if (! (msg->flags & CLVMD_FLAG_LOCAL)) { status = 0; else /* FIXME: usage of init_test() is unprotected */ -- 1.7.1 _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/