summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-03-18 19:55:31 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-19 01:31:29 -0700
commitb4a0db5ee3b827268fe1aeeed32ad7d417460c50 (patch)
treed79b3182062aa5c1b50eee24b0866d47fa7824c3 /libglusterfs
parenta1755ee2765f3d1c9c26d51a49ad63d133932710 (diff)
Adding ChangeTimeRecorder(CTR) Xlator to GlusterFS
********************************************************************** ChangeTimeRecorder(CTR) Xlator | ********************************************************************** ChangeTimeRecorder(CTR) is server side xlator(translator) which sits just above posix xlator. The main role of this xlator is to record the access/write patterns on a file residing the brick. It records the read(only data) and write(data and metadata) times and also count on how many times a file is read or written. This xlator also captures the hard links to a file(as its required by data tiering to move files). CTR Xlator is the consumer of libgfdb. To Enable/Disable CTR Xlator: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gluster volume set <volume-name> features.ctr-enabled {on/off} To Enable/Disable Frequency Counter Recording in CTR Xlator: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gluster volume set <volume-name> features.record-counters {on/off} Change-Id: I5d3cf056af61ac8e3f8250321a27cb240a214ac2 BUG: 1194753 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/9935 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/glusterfs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index adcff8cd274..9c9d9648a92 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -206,6 +206,10 @@
#define DHT_SKIP_NON_LINKTO_UNLINK "unlink-only-if-dht-linkto-file"
#define DHT_SKIP_OPEN_FD_UNLINK "dont-unlink-for-open-fd"
+/*CTR requires inode dentry link count from posix*/
+#define CTR_RESPONSE_LINK_COUNT_XDATA "ctr_response_link_count"
+#define CTR_REQUEST_LINK_COUNT_XDATA "ctr_request_link_count"
+
#define GF_LOG_LRU_BUFSIZE_DEFAULT 5
#define GF_LOG_LRU_BUFSIZE_MIN 0
#define GF_LOG_LRU_BUFSIZE_MAX 20
@@ -451,11 +455,11 @@ struct _glusterfs_graph {
struct timeval dob;
void *first;
void *top; /* selected by -n */
+ uint32_t leaf_count;
int xl_count;
int id; /* Used in logging */
int used; /* Should be set when fuse gets
first CHILD_UP */
- uint32_t leaf_count;
uint32_t volfile_checksum;
};
typedef struct _glusterfs_graph glusterfs_graph_t;