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 --- xlators/mgmt/glusterd/src/glusterd.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd.h') diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index f70a4c85822..ad280eda053 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -293,11 +293,26 @@ typedef enum gd_quorum_status_ { DOESNT_MEET_QUORUM, //Follows quorum and does not meet. } gd_quorum_status_t; +typedef struct tier_info_ { + int cold_type; + int cold_brick_count; + int cold_replica_count; + int cold_disperse_count; + int cold_dist_leaf_count; + int hot_type; + int hot_brick_count; + int hot_replica_count; + int hot_disperse_count; + /*Commented for now Dan's DHT Tier patch will have it*/ + /*tier_group_t *root;*/ +} gd_tier_info_t; + struct glusterd_volinfo_ { gf_lock_t lock; gf_boolean_t is_snap_volume; glusterd_snap_t *snapshot; uuid_t restored_from_snap; + gd_tier_info_t tier_info; char parent_volname[GD_VOLUME_NAME_MAX]; /* In case of a snap volume i.e (is_snap_volume == TRUE) this @@ -983,6 +998,7 @@ int glusterd_op_stage_clearlocks_volume (dict_t *dict, char **op_errstr); int glusterd_op_clearlocks_volume (dict_t *dict, char **op_errstr, dict_t *rsp_dict); + int glusterd_op_stage_barrier (dict_t *dict, char **op_errstr); int glusterd_op_barrier (dict_t *dict, char **op_errstr); @@ -999,6 +1015,7 @@ int glusterd_op_gsync_args_get (dict_t *dict, char **op_errstr, int glusterd_start_volume (glusterd_volinfo_t *volinfo, int flags, gf_boolean_t wait); + int glusterd_stop_volume (glusterd_volinfo_t *volinfo); /* Synctask part */ -- cgit