FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default qdiskd: warn users when we cannot write eviction notice to disk

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
: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
",
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!
",
+ ni[x].ni_status.ps_nodeid);
if (ctx->qc_flags & RF_ALLOW_KILL) {
logt_print(LOG_DEBUG, "Telling CMAN to "
"kill the node
");
@@ -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
",
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!
",
+ 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
 

Thread Tools




All times are GMT. The time now is 04:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org