public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: jbrassow@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, RHEL5, updated. cmirror_1_1_15-67-gc4f4cf4 Date: Fri, 09 May 2008 00:15:00 -0000 [thread overview] Message-ID: <20080509001459.22514.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848 The branch, RHEL5 has been updated via c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848 (commit) from ce7240aa680a09727c804815f0ed583af74c68f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c4f4cf4c01ff9d91d3d9406e32bf3d2a69f20848 Author: Jonathan Brassow <jbrassow@redhat.com> Date: Thu May 8 19:14:23 2008 -0500 clogd: Minor clean-up Pull out a function that was put in place purely for debugging. ----------------------------------------------------------------------- Summary of changes: cmirror/src/cluster.c | 29 ++++++++++------------------- cmirror/src/cluster.h | 3 +-- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c index d1ab920..4dc454c 100644 --- a/cmirror/src/cluster.c +++ b/cmirror/src/cluster.c @@ -76,9 +76,10 @@ static struct list_head clog_cpg_list; * * Returns: 0 on success, -Exxx on error */ -static int cluster_send(struct clog_tfr *tfr) +int cluster_send(struct clog_tfr *tfr) { int r; + int count=0; int found; struct iovec iov; struct clog_cpg *entry, *tmp; @@ -101,14 +102,19 @@ static int cluster_send(struct clog_tfr *tfr) LOG_ERROR("[%s] Attempt to send request to cluster while CPG not valid: " "request = %s", SHORT_UUID(tfr->uuid), RQ_TYPE(tfr->request_type)); - r = cpg_mcast_joined(entry->handle, CPG_TYPE_AGREED, &iov, 1); + do { + r = cpg_mcast_joined(entry->handle, CPG_TYPE_AGREED, &iov, 1); + if ((r != SA_AIS_ERR_TRY_AGAIN) || (count++ > 5)) + break; + sleep(1); + } while (1); + if (r == CPG_OK) return 0; - if (r == SA_AIS_ERR_TRY_AGAIN) - return -EAGAIN; /* error codes found in openais/cpg.h */ LOG_ERROR("cpg_mcast_joined error: %d%s", r, + (r == SA_AIS_ERR_TRY_AGAIN) ? "/SA_AIS_ERR_TRY_AGAIN" : (r == CPG_ERR_BAD_HANDLE) ? "/CPG_ERR_BAD_HANDLE" : (r == CPG_ERR_ACCESS) ? "/CPG_ERR_ACCESS" : ""); @@ -116,21 +122,6 @@ static int cluster_send(struct clog_tfr *tfr) return -EBADE; } -/* FIXME: this is here for debugging... remove */ -int cluster_send_helper(struct clog_tfr *tfr, int line, char *file, const char *function) -{ - int r; - - do { - r = cluster_send(tfr); - if (r) - LOG_ERROR("cluster_send failed at: %s:%d (%s)", - file, line, function); - } while (r == -EAGAIN); - - return r; -} - static int clog_tfr_cmp(struct clog_tfr *a, struct clog_tfr *b) { int r = 0; diff --git a/cmirror/src/cluster.h b/cmirror/src/cluster.h index 20526b4..7ee05bf 100644 --- a/cmirror/src/cluster.h +++ b/cmirror/src/cluster.h @@ -7,7 +7,6 @@ void cleanup_cluster(void); int create_cluster_cpg(char *str); int destroy_cluster_cpg(char *str); -int cluster_send_helper(struct clog_tfr *tfr, int line, char *file, const char *function); -#define cluster_send(x) cluster_send_helper((x), __LINE__, __FILE__, __FUNCTION__) +int cluster_send(struct clog_tfr *tfr); #endif /* __CLUSTER_LOG_CLUSTER_DOT_H__ */ hooks/post-receive -- Cluster Project
reply other threads:[~2008-05-09 0:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080509001459.22514.qmail@sourceware.org \ --to=jbrassow@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).