summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2014-05-28 13:56:04 +0530
committerKaushal M <kaushal@redhat.com>2014-07-02 02:19:37 -0700
commit831efecf927788f26b630cb82d5d6ff4af411a3d (patch)
treecee0cd0b3925185f72b5b6e7996717df9fb69e0e /xlators/mgmt/glusterd/src/glusterd-syncop.c
parent858b570a0c62d31416f0aee8c385b3118a1fad43 (diff)
glusterd/snapshot : Fix for snap create preval for remote peer err msg
Fix for the snap create prevalidation error collation when remote peer failed. Change-Id: If9563580eae4d9bc4d4d795f0b434f2c85b94007 BUG: 1101993 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/7899 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c57
1 files changed, 1 insertions, 56 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 1381edbab9d..6e7a9b6c8be 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -13,6 +13,7 @@
#include "xdr-generic.h"
#include "glusterd1-xdr.h"
#include "glusterd-syncop.h"
+#include "glusterd-mgmt.h"
#include "glusterd.h"
#include "glusterd-op-sm.h"
@@ -34,62 +35,6 @@ gd_synctask_barrier_wait (struct syncargs *args, int count)
}
static void
-gd_mgmt_v3_collate_errors (struct syncargs *args, int op_ret, int op_errno,
- char *op_errstr, int op_code,
- glusterd_peerinfo_t *peerinfo, u_char *uuid)
-{
- char err_str[PATH_MAX] = "Please check log file for details.";
- char op_err[PATH_MAX] = "";
- char *peer_str = NULL;
-
- if (op_ret) {
- args->op_ret = op_ret;
- args->op_errno = op_errno;
-
- if (peerinfo)
- peer_str = peerinfo->hostname;
- else
- peer_str = uuid_utoa (uuid);
-
- if (op_errstr && strcmp (op_errstr, ""))
- snprintf (err_str, sizeof(err_str) - 1,
- "Error: %s", op_errstr);
-
- switch (op_code) {
- case GLUSTERD_MGMT_V3_LOCK:
- {
- snprintf (op_err, sizeof(op_err) - 1,
- "Locking failed "
- "on %s. %s", peer_str, err_str);
- break;
- }
- case GLUSTERD_MGMT_V3_UNLOCK:
- {
- snprintf (op_err, sizeof(op_err) - 1,
- "Unlocking failed "
- "on %s. %s", peer_str, err_str);
- break;
- }
- }
-
- if (args->errstr) {
- snprintf (err_str, sizeof(err_str) - 1,
- "%s\n%s", args->errstr,
- op_err);
- GF_FREE (args->errstr);
- args->errstr = NULL;
- } else
- snprintf (err_str, sizeof(err_str) - 1,
- "%s", op_err);
-
- gf_log ("", GF_LOG_ERROR, "%s", op_err);
- args->errstr = gf_strdup (err_str);
- }
-
- return;
-}
-
-static void
gd_collate_errors (struct syncargs *args, int op_ret, int op_errno,
char *op_errstr, int op_code,
glusterd_peerinfo_t *peerinfo, u_char *uuid)