From: <n-...@us...> - 2010-06-28 12:55:44
|
Revision: 4806 http://gfarm.svn.sourceforge.net/gfarm/?rev=4806&view=rev Author: n-soda Date: 2010-06-28 12:55:38 +0000 (Mon, 28 Jun 2010) Log Message: ----------- fix #115 (gfmd scheduling protocols return dead filesystem nodes since r4545) Modified Paths: -------------- gfarm_v2/trunk/server/gfmd/host.c Modified: gfarm_v2/trunk/server/gfmd/host.c =================================================================== --- gfarm_v2/trunk/server/gfmd/host.c 2010-06-28 12:41:24 UTC (rev 4805) +++ gfarm_v2/trunk/server/gfmd/host.c 2010-06-28 12:55:38 UTC (rev 4806) @@ -1620,6 +1620,12 @@ filter, closure, 1, diag)); } +static int +up_filter(struct host *h, void *closure) +{ + return (host_is_up(h)); +} + gfarm_error_t host_schedule_reply_one_or_all(struct peer *peer, const char *diag) { @@ -1635,7 +1641,7 @@ e = host_schedule_reply(h, peer, diag); return (e_save != GFARM_ERR_NO_ERROR ? e_save : e); } else - return (host_schedule_reply_all(peer, diag, NULL, NULL)); + return (host_schedule_reply_all(peer, diag, up_filter, NULL)); } gfarm_error_t @@ -1670,11 +1676,12 @@ } static int -domain_filter(struct host *h, void *d) +up_and_domain_filter(struct host *h, void *d) { const char *domain = d; - return (gfarm_host_is_in_domain(host_name(h), domain)); + return (host_is_up(h) && + gfarm_host_is_in_domain(host_name(h), domain)); } gfarm_error_t @@ -1698,7 +1705,7 @@ /* XXX FIXME too long giant lock */ giant_lock(); - e = host_schedule_reply_all(peer, diag, domain_filter, domain); + e = host_schedule_reply_all(peer, diag, up_and_domain_filter, domain); giant_unlock(); free(domain); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |