From 8b30d3459fd92d8c16a009d145142c5b8fe4fe65 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 6 Sep 2010 03:35:02 +0000 Subject: misc replace-brick fixes Signed-off-by: Vijay Bellur Signed-off-by: Vijay Bellur BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235 --- xlators/protocol/client/src/client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/client/src/client.c') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index f500a461212..6a6d0b5ff46 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -849,7 +849,7 @@ is_client_rpc_init_command (dict_t *dict, xlator_t *this, gf_boolean_t ret = _gf_false; int dict_ret = -1; - if (strncmp (this->name, "replace-brick", 13)) + if (!strstr (this->name, "replace-brick")) goto out; dict_ret = dict_get_str (dict, CLIENT_CMD_CONNECT, value); @@ -983,8 +983,11 @@ client_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict, } conf = this->private; - if (!conf->fops) + if (!conf->fops) { + op_errno = ENOTCONN; + need_unwind = 1; goto out; + } args.loc = loc; args.dict = dict; -- cgit