summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2016-08-17 12:55:37 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-08-27 04:14:36 -0700
commit3cc7f6588c281846f8c590553da03dd16f150e8a (patch)
tree7e0bf165103d47d5ab0f00a4ccafd511e3ced6bc /libglusterfs/src
parent225d8034354a233bbb9f1c6fd86b40562efd0ae9 (diff)
md-cache: Add cache hit and miss counters
These counters can be accessed either by .meta interface or statedump. From meta: cat on the private file in md-cache directory. Eg: cat /mnt/glusterfs/0/.meta/graphs/active/patchy-md-cache/private [performance/md-cache.patchy-md-cache] stat_hit_count = 2 stat_miss_count = 8 xattr_hit_count = 4 xattr_miss_count = 3 nameless_lookup_count = 1 negative_lookup_count = 0 stat_invalidations_recieved = 1 xattr_invalidations_recieved = 1 Change-Id: Ib62a8822f263a9f75858b15832d0119fbe382629 BUG: 1211863 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15185 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/client_t.h17
-rw-r--r--libglusterfs/src/globals.h17
2 files changed, 17 insertions, 17 deletions
diff --git a/libglusterfs/src/client_t.h b/libglusterfs/src/client_t.h
index bfea62061bd..29ea7f29ce8 100644
--- a/libglusterfs/src/client_t.h
+++ b/libglusterfs/src/client_t.h
@@ -73,23 +73,6 @@ typedef struct clienttable clienttable_t;
struct rpcsvc_auth_data;
-/*
- * a more comprehensive feature test is shown at
- * http://lists.iptel.org/pipermail/semsdev/2010-October/005075.html
- * this is sufficient for RHEL5 i386 builds
- */
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined(__i386__)
-# define INCREMENT_ATOMIC(lk,op) __sync_add_and_fetch(&op, 1)
-# define DECREMENT_ATOMIC(lk,op) __sync_sub_and_fetch(&op, 1)
-#else
-/* These are only here for old gcc, e.g. on RHEL5 i386.
- * We're not ever going to use this in an if stmt,
- * but let's be pedantically correct for style points */
-# define INCREMENT_ATOMIC(lk,op) do { LOCK (&lk); ++op; UNLOCK (&lk); } while (0)
-/* this is a gcc 'statement expression', it works with llvm/clang too */
-# define DECREMENT_ATOMIC(lk,op) ({ LOCK (&lk); --op; UNLOCK (&lk); op; })
-#endif
-
client_t *
gf_client_get (xlator_t *this, struct rpcsvc_auth_data *cred, char *client_uid);
diff --git a/libglusterfs/src/globals.h b/libglusterfs/src/globals.h
index e6cb593c238..50734ecc2d8 100644
--- a/libglusterfs/src/globals.h
+++ b/libglusterfs/src/globals.h
@@ -80,6 +80,23 @@
#define THIS (*__glusterfs_this_location())
#define DECLARE_OLD_THIS xlator_t *old_THIS = THIS
+/*
+ * a more comprehensive feature test is shown at
+ * http://lists.iptel.org/pipermail/semsdev/2010-October/005075.html
+ * this is sufficient for RHEL5 i386 builds
+ */
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined(__i386__)
+# define INCREMENT_ATOMIC(lk, op) __sync_add_and_fetch(&op, 1)
+# define DECREMENT_ATOMIC(lk, op) __sync_sub_and_fetch(&op, 1)
+#else
+/* These are only here for old gcc, e.g. on RHEL5 i386.
+ * We're not ever going to use this in an if stmt,
+ * but let's be pedantically correct for style points */
+# define INCREMENT_ATOMIC(lk, op) do { LOCK (&lk); ++op; UNLOCK (&lk); } while (0)
+/* this is a gcc 'statement expression', it works with llvm/clang too */
+# define DECREMENT_ATOMIC(lk, op) ({ LOCK (&lk); --op; UNLOCK (&lk); op; })
+#endif
+
xlator_t **__glusterfs_this_location (void);
xlator_t *glusterfs_this_get (void);
int glusterfs_this_set (xlator_t *);