summaryrefslogtreecommitdiffstats
path: root/xlators/performance/nl-cache/src/nl-cache-messages.h
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-04-12 15:24:14 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-04-20 00:18:52 -0400
commit561766e45a323be3d5c521fdb47f68d71cea776e (patch)
tree4f2505ff34a5d64caeb7fc1c1693f729a84c956a /xlators/performance/nl-cache/src/nl-cache-messages.h
parent2aeca0ef02733ebd9b7979e4c27585f3ebff53d7 (diff)
Implement negative lookup cache
Before creating any file negative lookups(1 in Fuse, 4 in SMB etc.) are sent to verify if the file already exists. By serving these lookups from the cache when possible, increases the create performance by multiple folds in SMB access and some percentage in Fuse/NFS access. Feature page: https://review.gluster.org/#/c/16436 Updates #82 Change-Id: Ib1c0e7ac7a386f943d84f6398c27f9a03665b2a4 BUG: 1442569 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16952 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/performance/nl-cache/src/nl-cache-messages.h')
-rw-r--r--xlators/performance/nl-cache/src/nl-cache-messages.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/xlators/performance/nl-cache/src/nl-cache-messages.h b/xlators/performance/nl-cache/src/nl-cache-messages.h
new file mode 100644
index 00000000000..2e3b89443c3
--- /dev/null
+++ b/xlators/performance/nl-cache/src/nl-cache-messages.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+
+#ifndef __NL_CACHE_MESSAGES_H__
+#define __NL_CACHE_MESSAGES_H__
+
+
+#define GLFS_COMP_BASE_NLC GLFS_MSGID_COMP_NLC
+#define GLFS_NUM_MESSAGES 4
+#define GLFS_MSGID_END (GLFS_COMP_BASE_NLC + GLFS_NUM_MESSAGES + 1)
+
+#define glfs_msg_start_x GLFS_COMP_BASE_NLC, "Invalid: Start of messages"
+
+/*!
+ * @messageid 110001
+ * @diagnosis Out of Memory
+ * @recommendedaction None
+ */
+#define NLC_MSG_NO_MEMORY (GLFS_COMP_BASE_NLC + 1)
+#define NLC_MSG_EINVAL (GLFS_COMP_BASE_NLC + 2)
+#define NLC_MSG_NO_TIMER_WHEEL (GLFS_COMP_BASE_NLC + 3)
+#define NLC_MSG_DICT_FAILURE (GLFS_COMP_BASE_NLC + 4)
+#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
+
+
+#endif /* __NL_CACHE_MESSAGES_H__ */