From b4a0db5ee3b827268fe1aeeed32ad7d417460c50 Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Wed, 18 Mar 2015 19:55:31 +0530 Subject: 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 features.ctr-enabled {on/off} To Enable/Disable Frequency Counter Recording in CTR Xlator: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gluster volume set features.record-counters {on/off} Change-Id: I5d3cf056af61ac8e3f8250321a27cb240a214ac2 BUG: 1194753 Signed-off-by: Joseph Fernandes Reviewed-on: http://review.gluster.org/9935 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/glusterfs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src') 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; -- cgit