From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Wed, 23 Nov 2011 11:15:49 +0100 Subject: [Cluster-devel] [PATCH 30/41] qdiskd: warn users when we cannot write eviction notice to disk In-Reply-To: <1322043360-17037-1-git-send-email-fdinitto@redhat.com> References: <1322043360-17037-1-git-send-email-fdinitto@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Spotted by Coverity Scan Signed-off-by: Fabio M. Di Nitto --- :100644 100644 6e9abea... c4db713... M cman/qdisk/main.c cman/qdisk/main.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c index 6e9abea..c4db713 100644 --- a/cman/qdisk/main.c +++ b/cman/qdisk/main.c @@ -300,8 +300,10 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask) logt_print(LOG_NOTICE, "Writing eviction notice for node %d\n", ni[x].ni_status.ps_nodeid); - qd_write_status(ctx, ni[x].ni_status.ps_nodeid, - S_EVICT, NULL, NULL, NULL); + if (qd_write_status(ctx, ni[x].ni_status.ps_nodeid, + S_EVICT, NULL, NULL, NULL) != 0) + logt_print(LOG_CRIT, "Unable to write eviction notice for node %d!\n", + ni[x].ni_status.ps_nodeid); if (ctx->qc_flags & RF_ALLOW_KILL) { logt_print(LOG_DEBUG, "Telling CMAN to " "kill the node\n"); @@ -335,8 +337,10 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask) logt_print(LOG_ALERT, "Writing eviction notice (again) for node %d\n", ni[x].ni_status.ps_nodeid); - qd_write_status(ctx, ni[x].ni_status.ps_nodeid, - S_EVICT, NULL, NULL, NULL); + if (qd_write_status(ctx, ni[x].ni_status.ps_nodeid, + S_EVICT, NULL, NULL, NULL) != 0) + logt_print(LOG_CRIT, "Unable to write eviction notice for node %d!\n", + ni[x].ni_status.ps_nodeid); ni[x].ni_status.ps_state = S_EVICT; /* XXX Need to fence it again */ @@ -1850,7 +1854,7 @@ get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh) ctx->qc_sched_prio = 1; ctx->qc_max_error_cycles = 0; } - + if (get_dynamic_config_data(ctx, ccsfd) < 0) { goto out; } -- 1.7.4.4