|
|
7f4c2a |
From 3abdb22c4d9b3ba8738bfb565fb02b5d38b222b4 Mon Sep 17 00:00:00 2001
|
|
|
7f4c2a |
From: Mohamed Ashiq <ashiq333@gmail.com>
|
|
|
7f4c2a |
Date: Wed, 27 May 2015 15:20:59 +0530
|
|
|
7f4c2a |
Subject: [PATCH 152/190] changetimerecorder : Porting to new logging framework
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Change-Id: I66e7ccc5e62482c3ecf0aab302568e6c9ecdc05d
|
|
|
7f4c2a |
BUG: 1231797
|
|
|
7f4c2a |
Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com>
|
|
|
7f4c2a |
Tested-by: Gluster Build System <jenkins@build.gluster.com>
|
|
|
7f4c2a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/51210
|
|
|
7f4c2a |
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
|
|
|
7f4c2a |
Tested-by: Dan Lambright <dlambrig@redhat.com>
|
|
|
7f4c2a |
---
|
|
|
7f4c2a |
libglusterfs/src/Makefile.am | 2 +-
|
|
|
7f4c2a |
libglusterfs/src/ctr-messages.h | 501 ++++++++++++++++++++
|
|
|
7f4c2a |
libglusterfs/src/glfs-message-id.h | 3 +
|
|
|
7f4c2a |
.../changetimerecorder/src/changetimerecorder.c | 213 +++++----
|
|
|
7f4c2a |
.../features/changetimerecorder/src/ctr-helper.c | 32 +-
|
|
|
7f4c2a |
.../features/changetimerecorder/src/ctr-helper.h | 40 +-
|
|
|
7f4c2a |
.../changetimerecorder/src/ctr-xlator-ctx.c | 38 +-
|
|
|
7f4c2a |
7 files changed, 703 insertions(+), 126 deletions(-)
|
|
|
7f4c2a |
create mode 100644 libglusterfs/src/ctr-messages.h
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
|
|
|
7f4c2a |
index ed441d0..3862328 100644
|
|
|
7f4c2a |
--- a/libglusterfs/src/Makefile.am
|
|
|
7f4c2a |
+++ b/libglusterfs/src/Makefile.am
|
|
|
7f4c2a |
@@ -44,7 +44,7 @@ noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h timespec.
|
|
|
7f4c2a |
run.h options.h lkowner.h fd-lk.h circ-buff.h event-history.h \
|
|
|
7f4c2a |
gidcache.h client_t.h glusterfs-acl.h glfs-message-id.h \
|
|
|
7f4c2a |
template-component-messages.h strfd.h syncop-utils.h parse-utils.h \
|
|
|
7f4c2a |
- libglusterfs-messages.h \
|
|
|
7f4c2a |
+ libglusterfs-messages.h ctr-messages.h \
|
|
|
7f4c2a |
$(CONTRIBDIR)/mount/mntent_compat.h lvm-defaults.h \
|
|
|
7f4c2a |
$(CONTRIBDIR)/libexecinfo/execinfo_compat.h \
|
|
|
7f4c2a |
unittest/unittest.h quota-common-utils.h rot-buffs.h \
|
|
|
7f4c2a |
diff --git a/libglusterfs/src/ctr-messages.h b/libglusterfs/src/ctr-messages.h
|
|
|
7f4c2a |
new file mode 100644
|
|
|
7f4c2a |
index 0000000..27de07a
|
|
|
7f4c2a |
--- /dev/null
|
|
|
7f4c2a |
+++ b/libglusterfs/src/ctr-messages.h
|
|
|
7f4c2a |
@@ -0,0 +1,501 @@
|
|
|
7f4c2a |
+/*
|
|
|
7f4c2a |
+ Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
|
|
|
7f4c2a |
+ This file is part of GlusterFS.
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+ This file is licensed to you under your choice of the GNU Lesser
|
|
|
7f4c2a |
+ General Public License, version 3 or any later version (LGPLv3 or
|
|
|
7f4c2a |
+ later), or the GNU General Public License, version 2 (GPLv2), in all
|
|
|
7f4c2a |
+ cases as published by the Free Software Foundation.
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#ifndef _component_MESSAGES_H_
|
|
|
7f4c2a |
+#define _component_MESSAGES_H_
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#ifndef _CONFIG_H
|
|
|
7f4c2a |
+#define _CONFIG_H
|
|
|
7f4c2a |
+#include "config.h"
|
|
|
7f4c2a |
+#endif
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#include "glfs-message-id.h"
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/* NOTE: Rules for message additions
|
|
|
7f4c2a |
+ * 1) Each instance of a message is _better_ left with a unique message ID, even
|
|
|
7f4c2a |
+ * if the message format is the same. Reasoning is that, if the message
|
|
|
7f4c2a |
+ * format needs to change in one instance, the other instances are not
|
|
|
7f4c2a |
+ * impacted or the new change does not change the ID of the instance being
|
|
|
7f4c2a |
+ * modified.
|
|
|
7f4c2a |
+ * 2) Addition of a message,
|
|
|
7f4c2a |
+ * - Should increment the GLFS_NUM_MESSAGES
|
|
|
7f4c2a |
+ * - Append to the list of messages defined, towards the end
|
|
|
7f4c2a |
+ * - Retain macro naming as glfs_msg_X (for redability across developers)
|
|
|
7f4c2a |
+ * NOTE: Rules for message format modifications
|
|
|
7f4c2a |
+ * 3) Check acorss the code if the message ID macro in question is reused
|
|
|
7f4c2a |
+ * anywhere. If reused then then the modifications should ensure correctness
|
|
|
7f4c2a |
+ * everywhere, or needs a new message ID as (1) above was not adhered to. If
|
|
|
7f4c2a |
+ * not used anywhere, proceed with the required modification.
|
|
|
7f4c2a |
+ * NOTE: Rules for message deletion
|
|
|
7f4c2a |
+ * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
|
|
|
7f4c2a |
+ * anywhere, then can be deleted, but will leave a hole by design, as
|
|
|
7f4c2a |
+ * addition rules specify modification to the end of the list and not filling
|
|
|
7f4c2a |
+ * holes.
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#define GLFS_COMP_BASE GLFS_MSGID_COMP_CTR
|
|
|
7f4c2a |
+#define GLFS_NUM_MESSAGES 56
|
|
|
7f4c2a |
+#define GLFS_MSGID_END (GLFS_COMP_BASE + GLFS_NUM_MESSAGES + 1)
|
|
|
7f4c2a |
+/* Messaged with message IDs */
|
|
|
7f4c2a |
+#define glfs_msg_start_x GLFS_COMP_BASE, "Invalid: Start of messages"
|
|
|
7f4c2a |
+/*------------*/
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#define CTR_MSG_CREATE_CTR_LOCAL_ERROR_WIND (GLFS_COMP_BASE + 1)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_FILL_CTR_LOCAL_ERROR_UNWIND (GLFS_COMP_BASE + 2)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_FILL_CTR_LOCAL_ERROR_WIND (GLFS_COMP_BASE + 3)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_LINK_WIND_FAILED (GLFS_COMP_BASE + 4)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_WRITEV_WIND_FAILED (GLFS_COMP_BASE + 5)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_WRITEV_UNWIND_FAILED (GLFS_COMP_BASE + 6)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_SETATTR_WIND_FAILED (GLFS_COMP_BASE + 7)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_SETATTR_UNWIND_FAILED (GLFS_COMP_BASE + 8)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FREMOVEXATTR_UNWIND_FAILED (GLFS_COMP_BASE + 9)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FREMOVEXATTR_WIND_FAILED (GLFS_COMP_BASE + 10)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_REMOVEXATTR_WIND_FAILED (GLFS_COMP_BASE + 11)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_REMOVEXATTR_UNWIND_FAILED (GLFS_COMP_BASE + 12)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_TRUNCATE_WIND_FAILED (GLFS_COMP_BASE + 13)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_TRUNCATE_UNWIND_FAILED (GLFS_COMP_BASE + 14)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FTRUNCATE_UNWIND_FAILED (GLFS_COMP_BASE + 15)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FTRUNCATE_WIND_FAILED (GLFS_COMP_BASE + 16)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_RENAME_WIND_FAILED (GLFS_COMP_BASE + 17)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_RENAME_UNWIND_FAILED (GLFS_COMP_BASE + 18)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_ACCESS_CTR_INODE_CONTEXT_FAILED (GLFS_COMP_BASE + 19)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_ADD_HARDLINK_FAILED (GLFS_COMP_BASE + 20)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_DELETE_HARDLINK_FAILED (GLFS_COMP_BASE + 21)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_UPDATE_HARDLINK_FAILED (GLFS_COMP_BASE + 22)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_GET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED (GLFS_COMP_BASE + 23)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_SET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED (GLFS_COMP_BASE + 24)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_UNLINK_UNWIND_FAILED (GLFS_COMP_BASE + 25)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_UNLINK_WIND_FAILED (GLFS_COMP_BASE + 26)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_XDATA_NULL (GLFS_COMP_BASE + 27)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FSYNC_WIND_FAILED (GLFS_COMP_BASE + 28)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_FSYNC_UNWIND_FAILED (GLFS_COMP_BASE + 29)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_MKNOD_UNWIND_FAILED (GLFS_COMP_BASE + 30)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_MKNOD_WIND_FAILED (GLFS_COMP_BASE + 31)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_CREATE_WIND_FAILED (GLFS_COMP_BASE + 32)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_CREATE_UNWIND_FAILED (GLFS_COMP_BASE + 33)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_RECORD_WIND_FAILED (GLFS_COMP_BASE + 34)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INSERT_READV_WIND_FAILED (GLFS_COMP_BASE + 35)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_GET_GFID_FROM_DICT_FAILED (GLFS_COMP_BASE + 36)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_SET (GLFS_COMP_BASE + 37)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_FATAL_ERROR (GLFS_COMP_BASE + 38)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_DANGLING_VOLUME (GLFS_COMP_BASE + 39)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_CALLOC_FAILED (GLFS_COMP_BASE + 40)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_EXTRACT_CTR_XLATOR_OPTIONS_FAILED (GLFS_COMP_BASE + 41)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INIT_DB_PARAMS_FAILED (GLFS_COMP_BASE + 42)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_CREATE_LOCAL_MEMORY_POOL_FAILED (GLFS_COMP_BASE + 43)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_MEM_ACC_INIT_FAILED (GLFS_COMP_BASE + 44)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_CLOSE_DB_CONN_FAILED (GLFS_COMP_BASE + 45)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_FILL_UNWIND_TIME_REC_ERROR (GLFS_COMP_BASE + 46)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_WRONG_FOP_PATH (GLFS_COMP_BASE + 47)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_CONSTRUCT_DB_PATH_FAILED (GLFS_COMP_BASE + 48)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_SET_VALUE_TO_SQL_PARAM_FAILED (GLFS_COMP_BASE + 49)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_XLATOR_DISABLED (GLFS_COMP_BASE + 50)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_HARDLINK_MISSING_IN_LIST (GLFS_COMP_BASE + 51)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_ADD_HARDLINK_TO_LIST_FAILED (GLFS_COMP_BASE + 52)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_INIT_LOCK_FAILED (GLFS_COMP_BASE + 53)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_COPY_FAILED (GLFS_COMP_BASE + 54)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_EXTRACT_DB_PARAM_OPTIONS_FAILED (GLFS_COMP_BASE + 55)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+#define CTR_MSG_ADD_HARDLINK_TO_CTR_INODE_CONTEXT_FAILED (GLFS_COMP_BASE + 56)
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+/*!
|
|
|
7f4c2a |
+ * @messageid
|
|
|
7f4c2a |
+ * @diagnosis
|
|
|
7f4c2a |
+ * @recommendedaction
|
|
|
7f4c2a |
+ *
|
|
|
7f4c2a |
+ */
|
|
|
7f4c2a |
+/*------------*/
|
|
|
7f4c2a |
+#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+#endif /* !_component_MESSAGES_H_ */
|
|
|
7f4c2a |
diff --git a/libglusterfs/src/glfs-message-id.h b/libglusterfs/src/glfs-message-id.h
|
|
|
7f4c2a |
index 69ed188..242e487 100644
|
|
|
7f4c2a |
--- a/libglusterfs/src/glfs-message-id.h
|
|
|
7f4c2a |
+++ b/libglusterfs/src/glfs-message-id.h
|
|
|
7f4c2a |
@@ -113,6 +113,9 @@
|
|
|
7f4c2a |
#define GLFS_MSGID_COMP_QUOTA_END (GLFS_MSGID_COMP_QUOTA +\
|
|
|
7f4c2a |
GLFS_MSGID_SEGMENT)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
+#define GLFS_MSGID_COMP_CTR GLFS_MSGID_COMP_QUOTA_END
|
|
|
7f4c2a |
+#define GLFS_MSGID_COMP_CTR_END (GLFS_MSGID_COMP_CTR+\
|
|
|
7f4c2a |
+ GLFS_MSGID_SEGMENT)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* --- new segments for messages goes above this line --- */
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
|
|
|
7f4c2a |
index dc23132..1fdeb7c 100644
|
|
|
7f4c2a |
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
|
|
|
7f4c2a |
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
|
|
|
7f4c2a |
@@ -12,6 +12,7 @@
|
|
|
7f4c2a |
|
|
|
7f4c2a |
#include "gfdb_sqlite3.h"
|
|
|
7f4c2a |
#include "ctr-helper.h"
|
|
|
7f4c2a |
+#include "ctr-messages.h"
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/*******************************inode forget***********************************/
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -99,7 +100,8 @@ ctr_lookup_wind(call_frame_t *frame,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
frame->local = init_ctr_local_t (this);
|
|
|
7f4c2a |
if (!frame->local) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CREATE_CTR_LOCAL_ERROR_WIND,
|
|
|
7f4c2a |
"WIND: Error while creating ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
};
|
|
|
7f4c2a |
@@ -169,8 +171,9 @@ ctr_lookup_unwind (call_frame_t *frame,
|
|
|
7f4c2a |
ret = insert_record(_priv->_db_conn,
|
|
|
7f4c2a |
&ctr_local->gfdb_db_record);
|
|
|
7f4c2a |
if (ret == -1) {
|
|
|
7f4c2a |
- gf_log(this->name, GF_LOG_ERROR, "UNWIND: Error"
|
|
|
7f4c2a |
- "filling ctr local");
|
|
|
7f4c2a |
+ gf_msg(this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_CTR_LOCAL_ERROR_UNWIND,
|
|
|
7f4c2a |
+ "UNWIND: Error filling ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -204,8 +207,8 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* if the lookup failed lookup dont do anything*/
|
|
|
7f4c2a |
if (op_ret == -1) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE, "lookup failed with %s",
|
|
|
7f4c2a |
- strerror (op_errno));
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "lookup failed with %s",
|
|
|
7f4c2a |
+ strerror (op_errno));
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -238,7 +241,7 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
/* Add hard link to the list */
|
|
|
7f4c2a |
ret = add_hard_link_ctx (frame, this, inode);
|
|
|
7f4c2a |
if (ret < 0) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE, "Failed adding hard link");
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "Failed adding hard link");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -247,8 +250,7 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
* created by ctr_lookup_wind */
|
|
|
7f4c2a |
ret = ctr_lookup_unwind(frame, this);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE,
|
|
|
7f4c2a |
- "Failed inserting link wind");
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "Failed inserting link wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -302,8 +304,9 @@ ctr_lookup (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
* No writing to the db yet */
|
|
|
7f4c2a |
ret = ctr_lookup_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting link wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_LINK_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting link wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -329,7 +332,8 @@ ctr_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_WRITEV_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting writev unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -362,8 +366,9 @@ ctr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting writev wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_WRITEV_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting writev wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -390,7 +395,8 @@ ctr_setattr_cbk (call_frame_t *frame,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_SETATTR_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting setattr unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -422,8 +428,9 @@ ctr_setattr (call_frame_t *frame,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting setattr wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_SETATTR_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting setattr wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -448,7 +455,8 @@ ctr_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FREMOVEXATTR_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting fremovexattr unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -478,8 +486,9 @@ ctr_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting fremovexattr wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FREMOVEXATTR_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting fremovexattr wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -504,7 +513,8 @@ ctr_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_REMOVEXATTR_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting removexattr unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -534,8 +544,9 @@ ctr_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting removexattr wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_REMOVEXATTR_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting removexattr wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -560,7 +571,8 @@ ctr_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_TRUNCATE_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting truncate unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -591,8 +603,9 @@ ctr_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting truncate wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_TRUNCATE_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting truncate wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
STACK_WIND (frame, ctr_truncate_cbk, FIRST_CHILD (this),
|
|
|
7f4c2a |
@@ -615,7 +628,8 @@ ctr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_INODE_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FTRUNCATE_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting ftruncate unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -645,8 +659,9 @@ ctr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting ftruncate wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FTRUNCATE_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting ftruncate wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -672,7 +687,8 @@ ctr_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this,
|
|
|
7f4c2a |
GFDB_FOP_DENTRY_WRITE, GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_RENAME_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting rename unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -715,16 +731,17 @@ ctr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting rename wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_RENAME_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting rename wind");
|
|
|
7f4c2a |
} else {
|
|
|
7f4c2a |
/* We are doing updation of hard link in inode context in wind
|
|
|
7f4c2a |
* As we dont get the "inode" in the call back for rename */
|
|
|
7f4c2a |
ret = update_hard_link_ctx (frame, this, oldloc->inode);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed updating hard link in"
|
|
|
7f4c2a |
- "ctr inode context");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_UPDATE_HARDLINK_FAILED, "Failed "
|
|
|
7f4c2a |
+ "updating hard link in ctr inode context");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -757,7 +774,8 @@ ctr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = dict_get_uint32 (xdata , CTR_RESPONSE_LINK_COUNT_XDATA,
|
|
|
7f4c2a |
&remaining_links);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_GET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED,
|
|
|
7f4c2a |
"Failed to getting CTR_RESPONSE_LINK_COUNT_XDATA");
|
|
|
7f4c2a |
remaining_links = -1;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -768,7 +786,8 @@ ctr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_DENTRY_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNDEL);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_UNLINK_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting unlink unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -777,7 +796,8 @@ ctr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_DENTRY_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNDEL_ALL);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_UNLINK_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting unlink unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -818,16 +838,17 @@ ctr_unlink (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting unlink wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_UNLINK_UNWIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting unlink wind");
|
|
|
7f4c2a |
} else {
|
|
|
7f4c2a |
/* We are doing delete of hard link in inode context in wind
|
|
|
7f4c2a |
* As we dont get the "inode" in the call back for rename */
|
|
|
7f4c2a |
ret = delete_hard_link_ctx (frame, this, loc->inode);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed deleting hard link from ctr "
|
|
|
7f4c2a |
- "inode context");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_DELETE_HARDLINK_FAILED, "Failed "
|
|
|
7f4c2a |
+ "deleting hard link from ctr inode context");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -843,17 +864,17 @@ ctr_unlink (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
is_xdata_created = (xdata) ? _gf_true : _gf_false;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
if (!xdata) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "xdata is NULL :"
|
|
|
7f4c2a |
- "Cannot send CTR_REQUEST_LINK_COUNT_XDATA"
|
|
|
7f4c2a |
- "to posix");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_XDATA_NULL, "xdata is NULL :Cannot send "
|
|
|
7f4c2a |
+ "CTR_REQUEST_LINK_COUNT_XDATA to posix");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = dict_set_int32 (xdata, CTR_REQUEST_LINK_COUNT_XDATA, 1);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed setting CTR_REQUEST_LINK_COUNT_XDATA");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_SET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED,
|
|
|
7f4c2a |
+ "Failed setting CTR_REQUEST_LINK_COUNT_XDATA");
|
|
|
7f4c2a |
if (is_xdata_created) {
|
|
|
7f4c2a |
dict_unref (xdata);
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -884,7 +905,8 @@ ctr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_INODE_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FSYNC_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting fsync unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -914,8 +936,9 @@ ctr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting fsync wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FSYNC_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting fsync wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -938,7 +961,8 @@ ctr_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_INODE_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_FSYNC_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting fsync unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -968,8 +992,9 @@ ctr_setxattr (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting setxattr wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_SETATTR_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting setxattr wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -995,13 +1020,14 @@ ctr_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
/* Add hard link to the list */
|
|
|
7f4c2a |
ret = add_hard_link_ctx (frame, this, inode);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE, "Failed adding hard link");
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "Failed adding hard link");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_CREATE_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_MKNOD_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting mknod unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1034,8 +1060,7 @@ ctr_mknod (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*get gfid from xdata dict*/
|
|
|
7f4c2a |
ret = dict_get_ptr (xdata, "gfid-req", &uuid_req);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_DEBUG,
|
|
|
7f4c2a |
- "failed to get gfid from dict");
|
|
|
7f4c2a |
+ gf_msg_debug (this->name, 0, "failed to get gfid from dict");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
gf_uuid_copy (gfid, uuid_req);
|
|
|
7f4c2a |
@@ -1054,8 +1079,9 @@ ctr_mknod (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting mknod wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_MKNOD_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting mknod wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -1080,13 +1106,16 @@ ctr_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = add_hard_link_ctx (frame, this, inode);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed adding hard link");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_ADD_HARDLINK_FAILED,
|
|
|
7f4c2a |
+ "Failed adding hard link");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_CREATE_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_CREATE_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting create unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1120,7 +1149,8 @@ ctr_create (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*Get GFID from Xdata dict*/
|
|
|
7f4c2a |
ret = dict_get_ptr (xdata, "gfid-req", &uuid_req);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_GET_GFID_FROM_DICT_FAILED,
|
|
|
7f4c2a |
"failed to get gfid from dict");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1140,8 +1170,9 @@ ctr_create (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, &ctr_inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting create wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_CREATE_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting create wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
STACK_WIND (frame, ctr_create_cbk, FIRST_CHILD (this),
|
|
|
7f4c2a |
@@ -1165,13 +1196,14 @@ ctr_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
/* Add hard link to the list */
|
|
|
7f4c2a |
ret = add_hard_link_ctx (frame, this, inode);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE, "Failed adding hard link");
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "Failed adding hard link");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_DENTRY_WRITE,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_CREATE_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting create unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1211,8 +1243,9 @@ ctr_link (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting link wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_LINK_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting link wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -1235,7 +1268,8 @@ int ctr_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
ret = ctr_insert_unwind(frame, this, GFDB_FOP_INODE_READ,
|
|
|
7f4c2a |
GFDB_FOP_UNWIND);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_CREATE_UNWIND_FAILED,
|
|
|
7f4c2a |
"Failed inserting create unwind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1265,8 +1299,9 @@ ctr_readv (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
/*record into the database*/
|
|
|
7f4c2a |
ret = ctr_insert_wind(frame, this, _inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed inserting readv wind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_READV_WIND_FAILED,
|
|
|
7f4c2a |
+ "Failed inserting readv wind");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
out:
|
|
|
7f4c2a |
@@ -1287,7 +1322,7 @@ reconfigure (xlator_t *this, dict_t *options)
|
|
|
7f4c2a |
_priv = this->private;
|
|
|
7f4c2a |
if (dict_get_str(options, "changetimerecorder.frequency",
|
|
|
7f4c2a |
&temp_str)) {
|
|
|
7f4c2a |
- gf_log(this->name, GF_LOG_INFO, "set!");
|
|
|
7f4c2a |
+ gf_msg(this->name, GF_LOG_INFO, 0, CTR_MSG_SET, "set!");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
GF_OPTION_RECONF ("ctr-enabled", _priv->enabled, options,
|
|
|
7f4c2a |
@@ -1322,19 +1357,22 @@ init (xlator_t *this)
|
|
|
7f4c2a |
GF_VALIDATE_OR_GOTO ("ctr", this, error);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
if (!this->children || this->children->next) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FATAL_ERROR,
|
|
|
7f4c2a |
"FATAL: ctr should have exactly one child");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
if (!this->parents) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_WARNING,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_WARNING, 0,
|
|
|
7f4c2a |
+ CTR_MSG_DANGLING_VOLUME,
|
|
|
7f4c2a |
"dangling volume. check volfile ");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
_priv = GF_CALLOC (1, sizeof (*_priv), gf_ctr_mt_private_t);
|
|
|
7f4c2a |
if (!_priv) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
|
|
|
7f4c2a |
+ CTR_MSG_CALLOC_FAILED,
|
|
|
7f4c2a |
"Calloc didnt work!!!");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1351,14 +1389,16 @@ init (xlator_t *this)
|
|
|
7f4c2a |
/*Extract ctr xlator options*/
|
|
|
7f4c2a |
ret_db = extract_ctr_options (this, _priv);
|
|
|
7f4c2a |
if (ret_db) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_EXTRACT_CTR_XLATOR_OPTIONS_FAILED,
|
|
|
7f4c2a |
"Failed extracting ctr xlator options");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
params_dict = dict_new ();
|
|
|
7f4c2a |
if (!params_dict) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INIT_DB_PARAMS_FAILED,
|
|
|
7f4c2a |
"DB Params cannot initialized!");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1366,7 +1406,8 @@ init (xlator_t *this)
|
|
|
7f4c2a |
/*Extract db params options*/
|
|
|
7f4c2a |
ret_db = extract_db_params(this, params_dict, _priv->gfdb_db_type);
|
|
|
7f4c2a |
if (ret_db) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_EXTRACT_DB_PARAM_OPTIONS_FAILED,
|
|
|
7f4c2a |
"Failed extracting db params options");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1374,7 +1415,8 @@ init (xlator_t *this)
|
|
|
7f4c2a |
/*Create a memory pool for ctr xlator*/
|
|
|
7f4c2a |
this->local_pool = mem_pool_new (gf_ctr_local_t, 64);
|
|
|
7f4c2a |
if (!this->local_pool) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CREATE_LOCAL_MEMORY_POOL_FAILED,
|
|
|
7f4c2a |
"failed to create local memory pool");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1382,7 +1424,8 @@ init (xlator_t *this)
|
|
|
7f4c2a |
/*Initialize Database Connection*/
|
|
|
7f4c2a |
_priv->_db_conn = init_db(params_dict, _priv->gfdb_db_type);
|
|
|
7f4c2a |
if (!_priv->_db_conn) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FATAL_ERROR,
|
|
|
7f4c2a |
"FATAL: Failed initializing data base");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1425,7 +1468,8 @@ mem_acct_init (xlator_t *this)
|
|
|
7f4c2a |
ret = xlator_mem_acct_init (this, gf_ctr_mt_end + 1);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
if (ret != 0) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Memory accounting init"
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_MEM_ACC_INIT_FAILED, "Memory accounting init"
|
|
|
7f4c2a |
"failed");
|
|
|
7f4c2a |
return ret;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -1443,8 +1487,9 @@ fini (xlator_t *this)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
if (priv) {
|
|
|
7f4c2a |
if (fini_db (priv->_db_conn)) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_WARNING, "Failed closing "
|
|
|
7f4c2a |
- "db connection");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_WARNING, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CLOSE_DB_CONN_FAILED, "Failed closing "
|
|
|
7f4c2a |
+ "db connection");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
GF_FREE (priv->ctr_db_path);
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.c b/xlators/features/changetimerecorder/src/ctr-helper.c
|
|
|
7f4c2a |
index 005f909..c4d9769 100644
|
|
|
7f4c2a |
--- a/xlators/features/changetimerecorder/src/ctr-helper.c
|
|
|
7f4c2a |
+++ b/xlators/features/changetimerecorder/src/ctr-helper.c
|
|
|
7f4c2a |
@@ -10,7 +10,7 @@
|
|
|
7f4c2a |
|
|
|
7f4c2a |
#include "gfdb_sqlite3.h"
|
|
|
7f4c2a |
#include "ctr-helper.h"
|
|
|
7f4c2a |
-
|
|
|
7f4c2a |
+#include "ctr-messages.h"
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/*******************************************************************************
|
|
|
7f4c2a |
*
|
|
|
7f4c2a |
@@ -35,8 +35,8 @@ fill_db_record_for_unwind(xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/*If not unwind path error*/
|
|
|
7f4c2a |
if (!isunwindpath(fop_path)) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Wrong fop_path."
|
|
|
7f4c2a |
- "Should be unwind");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0, CTR_MSG_WRONG_FOP_PATH,
|
|
|
7f4c2a |
+ "Wrong fop_path. Should be unwind");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -46,8 +46,9 @@ fill_db_record_for_unwind(xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = gettimeofday (ctr_uwtime, NULL);
|
|
|
7f4c2a |
if (ret == -1) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Error filling unwind time record %s",
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, errno,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_UNWIND_TIME_REC_ERROR, "Error "
|
|
|
7f4c2a |
+ "filling unwind time record %s",
|
|
|
7f4c2a |
strerror(errno));
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -89,7 +90,8 @@ fill_db_record_for_wind (xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/*if not wind path error!*/
|
|
|
7f4c2a |
if (!iswindpath(ctr_inode_cx->fop_path)) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_WRONG_FOP_PATH,
|
|
|
7f4c2a |
"Wrong fop_path. Should be wind");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -101,7 +103,8 @@ fill_db_record_for_wind (xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = gettimeofday (ctr_wtime, NULL);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, errno,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_UNWIND_TIME_REC_ERROR,
|
|
|
7f4c2a |
"Error filling wind time record %s",
|
|
|
7f4c2a |
strerror(errno));
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
@@ -182,8 +185,9 @@ extract_sql_params(xlator_t *this, dict_t *params_dict)
|
|
|
7f4c2a |
/*Construct full path of the db*/
|
|
|
7f4c2a |
ret = gf_asprintf(&db_full_path, "%s/%s", db_path, db_name);
|
|
|
7f4c2a |
if (ret < 0) {
|
|
|
7f4c2a |
- gf_log (GFDB_DATA_STORE, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Construction of full db path failed!");
|
|
|
7f4c2a |
+ gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CONSTRUCT_DB_PATH_FAILED,
|
|
|
7f4c2a |
+ "Construction of full db path failed!");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -194,8 +198,9 @@ extract_sql_params(xlator_t *this, dict_t *params_dict)
|
|
|
7f4c2a |
/*Extact rest of the sql params*/
|
|
|
7f4c2a |
ret = gfdb_set_sql_params(this->name, this->options, params_dict);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (GFDB_DATA_STORE, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed setting values to sql param dict!");
|
|
|
7f4c2a |
+ gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_SET_VALUE_TO_SQL_PARAM_FAILED,
|
|
|
7f4c2a |
+ "Failed setting values to sql param dict!");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = 0;
|
|
|
7f4c2a |
@@ -246,8 +251,9 @@ int extract_ctr_options (xlator_t *this, gf_ctr_private_t *_priv) {
|
|
|
7f4c2a |
_priv->enabled = _gf_false;
|
|
|
7f4c2a |
GF_OPTION_INIT ("ctr-enabled", _priv->enabled, bool, out);
|
|
|
7f4c2a |
if (!_priv->enabled) {
|
|
|
7f4c2a |
- gf_log (GFDB_DATA_STORE, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "CTR Xlator is disabled.");
|
|
|
7f4c2a |
+ gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_XLATOR_DISABLED,
|
|
|
7f4c2a |
+ "CTR Xlator is disabled.");
|
|
|
7f4c2a |
ret = 0;
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h
|
|
|
7f4c2a |
index 87b80e6..a3df971 100644
|
|
|
7f4c2a |
--- a/xlators/features/changetimerecorder/src/ctr-helper.h
|
|
|
7f4c2a |
+++ b/xlators/features/changetimerecorder/src/ctr-helper.h
|
|
|
7f4c2a |
@@ -29,6 +29,7 @@
|
|
|
7f4c2a |
|
|
|
7f4c2a |
#include "gfdb_data_store.h"
|
|
|
7f4c2a |
#include "ctr-xlator-ctx.h"
|
|
|
7f4c2a |
+#include "ctr-messages.h"
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/*CTR Xlator Private structure*/
|
|
|
7f4c2a |
typedef struct gf_ctr_private {
|
|
|
7f4c2a |
@@ -103,7 +104,8 @@ init_ctr_local_t (xlator_t *this) {
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ctr_local = mem_get0 (this->local_pool);
|
|
|
7f4c2a |
if (!ctr_local) {
|
|
|
7f4c2a |
- gf_log (GFDB_DATA_STORE, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CREATE_CTR_LOCAL_ERROR_WIND,
|
|
|
7f4c2a |
"Error while creating ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -346,7 +348,8 @@ ctr_insert_wind (call_frame_t *frame,
|
|
|
7f4c2a |
if (_priv->ctr_record_wind && ctr_inode_cx->ia_type != IA_IFDIR) {
|
|
|
7f4c2a |
frame->local = init_ctr_local_t (this);
|
|
|
7f4c2a |
if (!frame->local) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_CREATE_CTR_LOCAL_ERROR_WIND,
|
|
|
7f4c2a |
"WIND: Error while creating ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
};
|
|
|
7f4c2a |
@@ -378,7 +381,8 @@ ctr_insert_wind (call_frame_t *frame,
|
|
|
7f4c2a |
/*Fill the db record for insertion*/
|
|
|
7f4c2a |
ret = fill_db_record_for_wind (this, ctr_local, ctr_inode_cx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_CTR_LOCAL_ERROR_WIND,
|
|
|
7f4c2a |
"WIND: Error filling ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -387,7 +391,8 @@ ctr_insert_wind (call_frame_t *frame,
|
|
|
7f4c2a |
ret = insert_record (_priv->_db_conn,
|
|
|
7f4c2a |
&ctr_local->gfdb_db_record);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_INSERT_RECORD_WIND_FAILED,
|
|
|
7f4c2a |
"WIND: Inserting of record failed!");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -443,16 +448,18 @@ ctr_insert_unwind (call_frame_t *frame,
|
|
|
7f4c2a |
ret = fill_db_record_for_unwind(this, ctr_local, fop_type,
|
|
|
7f4c2a |
fop_path);
|
|
|
7f4c2a |
if (ret == -1) {
|
|
|
7f4c2a |
- gf_log(this->name, GF_LOG_ERROR, "UNWIND: Error"
|
|
|
7f4c2a |
- "filling ctr local");
|
|
|
7f4c2a |
+ gf_msg(this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_CTR_LOCAL_ERROR_UNWIND,
|
|
|
7f4c2a |
+ "UNWIND: Error filling ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = insert_record(_priv->_db_conn,
|
|
|
7f4c2a |
&ctr_local->gfdb_db_record);
|
|
|
7f4c2a |
if (ret == -1) {
|
|
|
7f4c2a |
- gf_log(this->name, GF_LOG_ERROR, "UNWIND: Error"
|
|
|
7f4c2a |
- "filling ctr local");
|
|
|
7f4c2a |
+ gf_msg(this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_FILL_CTR_LOCAL_ERROR_UNWIND,
|
|
|
7f4c2a |
+ "UNWIND: Error filling ctr local");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -486,7 +493,8 @@ add_hard_link_ctx (call_frame_t *frame,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ctr_xlator_ctx = init_ctr_xlator_ctx (this, inode);
|
|
|
7f4c2a |
if (!ctr_xlator_ctx) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_ACCESS_CTR_INODE_CONTEXT_FAILED,
|
|
|
7f4c2a |
"Failed accessing ctr inode context");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -510,7 +518,8 @@ add_hard_link_ctx (call_frame_t *frame,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).pargfid,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).file_name);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_ADD_HARDLINK_TO_CTR_INODE_CONTEXT_FAILED,
|
|
|
7f4c2a |
"Failed to add hardlink to the ctr inode context");
|
|
|
7f4c2a |
goto unlock;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -551,7 +560,9 @@ delete_hard_link_ctx (call_frame_t *frame,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).pargfid,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).file_name);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed to delete hard link");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_DELETE_HARDLINK_FAILED,
|
|
|
7f4c2a |
+ "Failed to delete hard link");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -581,7 +592,8 @@ update_hard_link_ctx (call_frame_t *frame,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ctr_xlator_ctx = init_ctr_xlator_ctx (this, inode);
|
|
|
7f4c2a |
if (!ctr_xlator_ctx) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_ACCESS_CTR_INODE_CONTEXT_FAILED,
|
|
|
7f4c2a |
"Failed accessing ctr inode context");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
@@ -592,7 +604,9 @@ update_hard_link_ctx (call_frame_t *frame,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).old_pargfid,
|
|
|
7f4c2a |
CTR_DB_REC(ctr_local).old_file_name);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed to delete hard link");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_DELETE_HARDLINK_FAILED,
|
|
|
7f4c2a |
+ "Failed to delete hard link");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/xlators/features/changetimerecorder/src/ctr-xlator-ctx.c b/xlators/features/changetimerecorder/src/ctr-xlator-ctx.c
|
|
|
7f4c2a |
index 927c854..a91a2bb 100644
|
|
|
7f4c2a |
--- a/xlators/features/changetimerecorder/src/ctr-xlator-ctx.c
|
|
|
7f4c2a |
+++ b/xlators/features/changetimerecorder/src/ctr-xlator-ctx.c
|
|
|
7f4c2a |
@@ -9,6 +9,7 @@
|
|
|
7f4c2a |
*/
|
|
|
7f4c2a |
|
|
|
7f4c2a |
#include "ctr-xlator-ctx.h"
|
|
|
7f4c2a |
+#include "ctr-messages.h"
|
|
|
7f4c2a |
|
|
|
7f4c2a |
#define IS_THE_ONLY_HARDLINK(ctr_hard_link)\
|
|
|
7f4c2a |
(ctr_hard_link->list.next == ctr_hard_link->list.prev)
|
|
|
7f4c2a |
@@ -79,8 +80,9 @@ ctr_add_hard_link (xlator_t *this,
|
|
|
7f4c2a |
ctr_hard_link = GF_CALLOC (1, sizeof (*ctr_hard_link),
|
|
|
7f4c2a |
gf_ctr_mt_hard_link_t);
|
|
|
7f4c2a |
if (!ctr_hard_link) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed allocating "
|
|
|
7f4c2a |
- "ctr_hard_link");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
|
|
|
7f4c2a |
+ CTR_MSG_CALLOC_FAILED, "Failed allocating "
|
|
|
7f4c2a |
+ "ctr_hard_link");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -90,8 +92,9 @@ ctr_add_hard_link (xlator_t *this,
|
|
|
7f4c2a |
gf_uuid_copy (ctr_hard_link->pgfid, pgfid);
|
|
|
7f4c2a |
ret = gf_asprintf(&ctr_hard_link->base_name, "%s", base_name);
|
|
|
7f4c2a |
if (ret < 0) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed copying basename"
|
|
|
7f4c2a |
- "to ctr_hard_link");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_COPY_FAILED, "Failed copying basename"
|
|
|
7f4c2a |
+ "to ctr_hard_link");
|
|
|
7f4c2a |
goto error;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -139,8 +142,9 @@ ctr_delete_hard_link (xlator_t *this,
|
|
|
7f4c2a |
ctr_hard_link = ctr_search_hard_link_ctx (this, ctr_xlator_ctx,
|
|
|
7f4c2a |
pgfid, base_name);
|
|
|
7f4c2a |
if (!ctr_hard_link) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Hard link doesnt exist"
|
|
|
7f4c2a |
- " in the list");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_HARDLINK_MISSING_IN_LIST,
|
|
|
7f4c2a |
+ "Hard link doesnt exist in the list");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -178,15 +182,16 @@ ctr_update_hard_link (xlator_t *this,
|
|
|
7f4c2a |
ctr_hard_link = ctr_search_hard_link_ctx (this, ctr_xlator_ctx,
|
|
|
7f4c2a |
old_pgfid, old_base_name);
|
|
|
7f4c2a |
if (!ctr_hard_link) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_TRACE, "Hard link doesnt exist"
|
|
|
7f4c2a |
- " in the list");
|
|
|
7f4c2a |
+ gf_msg_trace (this->name, 0, "Hard link doesnt exist"
|
|
|
7f4c2a |
+ " in the list");
|
|
|
7f4c2a |
/* Since the hard link is not present in the list
|
|
|
7f4c2a |
* we add it to the list */
|
|
|
7f4c2a |
ret = ctr_add_hard_link (this, ctr_xlator_ctx,
|
|
|
7f4c2a |
pgfid, base_name);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed adding"
|
|
|
7f4c2a |
- "hard link to the list");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_ADD_HARDLINK_TO_LIST_FAILED,
|
|
|
7f4c2a |
+ "Failed adding hard link to the list");
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
ret = 0;
|
|
|
7f4c2a |
@@ -198,7 +203,8 @@ ctr_update_hard_link (xlator_t *this,
|
|
|
7f4c2a |
GF_FREE (&ctr_hard_link->base_name);
|
|
|
7f4c2a |
ret = gf_asprintf(&ctr_hard_link->base_name, "%s", base_name);
|
|
|
7f4c2a |
if (ret < 0) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR, "Failed copying basename"
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
7f4c2a |
+ CTR_MSG_COPY_FAILED, "Failed copying basename"
|
|
|
7f4c2a |
"to ctr_hard_link");
|
|
|
7f4c2a |
/* delete the corrupted entry */
|
|
|
7f4c2a |
__delete_hard_link_from_list (&ctr_hard_link);
|
|
|
7f4c2a |
@@ -296,8 +302,9 @@ init_ctr_xlator_ctx (xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = LOCK_INIT (&ctr_xlator_ctx->lock);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_ERROR,
|
|
|
7f4c2a |
- "Failed init lock %s", strerror(ret));
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_ERROR, ret,
|
|
|
7f4c2a |
+ CTR_MSG_INIT_LOCK_FAILED,
|
|
|
7f4c2a |
+ "Failed init lock %s", strerror(ret));
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
_addr = (uint64_t) ctr_xlator_ctx;
|
|
|
7f4c2a |
@@ -342,8 +349,9 @@ fini_ctr_xlator_ctx (xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
ret = ctr_delete_all_hard_link (this, ctr_xlator_ctx);
|
|
|
7f4c2a |
if (ret) {
|
|
|
7f4c2a |
- gf_log (this->name, GF_LOG_WARNING , "Failed deleting all hard"
|
|
|
7f4c2a |
- " links from inode context");
|
|
|
7f4c2a |
+ gf_msg (this->name, GF_LOG_WARNING , 0,
|
|
|
7f4c2a |
+ CTR_MSG_DELETE_HARDLINK_FAILED, "Failed deleting all "
|
|
|
7f4c2a |
+ "hard links from inode context");
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
LOCK_DESTROY (&ctr_xlator_ctx->lock);
|
|
|
7f4c2a |
--
|
|
|
7f4c2a |
1.7.1
|
|
|
7f4c2a |
|