# patch for fetch-spec # if CHANNEL_BULK is connected after CHANNEL_LOWLAT, the fetch_spec would exit incorrectly. diff -ru glusterfs-2.0.0rc4.orig/glusterfsd/src/fetch-spec.c glusterfs-2.0.0rc4/glusterfsd/src/fetch-spec.c --- glusterfs-2.0.0rc4.orig/glusterfsd/src/fetch-spec.c 2009-03-03 23:14:14.000000000 +0800 +++ glusterfs-2.0.0rc4/glusterfsd/src/fetch-spec.c 2009-03-15 18:34:43.000000000 +0800 @@ -33,6 +33,7 @@ #include "transport.h" #include "event.h" #include "defaults.h" +#include "client-protocol.h" static int @@ -71,18 +72,27 @@ { int ret = 0; call_frame_t *frame = NULL; + xlator_t *trans_xl = NULL; + transport_t *trans = NULL; + client_connection_t *conn = NULL; switch (event) { case GF_EVENT_CHILD_UP: - frame = create_frame (this_xl, this_xl->ctx->pool); - frame->local = this_xl->private; + trans_xl = this_xl->children->xlator; + trans = CLIENT_CHANNEL (trans_xl, CHANNEL_BULK); + conn = trans->xl_private; - STACK_WIND (frame, fetch_cbk, - this_xl->children->xlator, - this_xl->children->xlator->mops->getspec, - this_xl->ctx->cmd_args.volfile_id, - 0); + if ( conn->connected ) { + frame = create_frame (this_xl, this_xl->ctx->pool); + frame->local = this_xl->private; + + STACK_WIND (frame, fetch_cbk, + this_xl->children->xlator, + this_xl->children->xlator->mops->getspec, + this_xl->ctx->cmd_args.volfile_id, + 0); + } break; case GF_EVENT_CHILD_DOWN: break; diff -ru glusterfs-2.0.0rc4.orig/glusterfsd/src/Makefile.am glusterfs-2.0.0rc4/glusterfsd/src/Makefile.am --- glusterfs-2.0.0rc4.orig/glusterfsd/src/Makefile.am 2009-03-03 23:14:14.000000000 +0800 +++ glusterfs-2.0.0rc4/glusterfsd/src/Makefile.am 2009-03-15 17:53:00.000000000 +0800 @@ -7,6 +7,7 @@ AM_CFLAGS = -fPIC -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\ -I$(top_srcdir)/libglusterfs/src -DDATADIR=\"$(localstatedir)\" \ + -I$(top_srcdir)/xlators/protocol/client/src \ -DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_GLUSTERFS_CFLAGS) CLEANFILES = diff -ru glusterfs-2.0.0rc4.orig/glusterfsd/src/Makefile.in glusterfs-2.0.0rc4/glusterfsd/src/Makefile.in --- glusterfs-2.0.0rc4.orig/glusterfsd/src/Makefile.in 2009-03-07 03:54:23.000000000 +0800 +++ glusterfs-2.0.0rc4/glusterfsd/src/Makefile.in 2009-03-15 17:53:07.000000000 +0800 @@ -213,7 +209,8 @@ noinst_HEADERS = glusterfsd.h AM_CFLAGS = -fPIC -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\ -I$(top_srcdir)/libglusterfs/src -DDATADIR=\"$(localstatedir)\" \ + -I$(top_srcdir)/xlators/protocol/client/src \ -DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_GLUSTERFS_CFLAGS) CLEANFILES = all: all-am