master - debug: add stack tracking
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e40768ac32e6de5e6f9614ae0ad702c93a4e1330 Commit: e40768ac32e6de5e6f9614ae0ad702c93a4e1330 Parent: 27399755fd1b1292cc93f6469162c0855b7231c2 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Feb 8 11:03:06 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Feb 12 22:15:03 2018 +0100
debug: add stack tracking
--- lib/locking/cluster_locking.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-)
lib/locking/cluster_locking.c +7 -8
@@ -211,11 +211,10 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int le *num =0 ; -if (_clvmd_sock ==-1 ) - _clvmd_sock =_open_local_sock (0 ); - -if (_clvmd_sock ==-1 ) -return 0 ; +if (_clvmd_sock ==-1 ) { +if ((_clvmd_sock =_open_local_sock (0 )) ==-1 ) + return_0; + }/* 1 byte is used from struct clvm_header.args[1], so -> len - 1 */ _build_header (head, clvmd_cmd, node, len -1 );
@@ -224,7 +223,7 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int le status =_send_request (outbuf,sizeof (struct clvm_header ) +strlen (head->node) + len -1 , &retbuf);if (!status) - goto out; + goto_out;/* Count the number of responses we got */ head = (struct clvm_header *) retbuf;
@@ -245,7 +244,7 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int leif (!(rarray =dm_malloc (sizeof (lvm_response_t) * num_responses))) { errno =ENOMEM ; status =0 ; - goto out; + goto_out; }/* Unpack the response into an lvm_response_t array */
@@ -267,7 +266,7 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int ledm_free (rarray); errno =ENOMEM ; status =0 ; - goto out; + goto_out; }strcpy (rarray[i].response, inptr);