From dafd31b7188057367cb9fb780f921f4bb8a930fb Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Mon, 7 Jan 2013 15:50:57 +0530 Subject: cluster/distribute: Add filter to support file patterns to be migrated 'gluster volume rebalance' command will be enhanced to support passing of these options/pattern. is comma separated list as show below. The Precedence is from right to left. e.g- "*avi,*pdf:10MB,*:1KB" The precedence is as follows: migrate all files with size equal or greater than 1KB "*:1KB" migrate all pdf files with size equal or greater than 10MB "*pdf:10MB" migrate all avi files "*avi" With this option, it is possible to choose which files to migrate. Change-Id: I6d6d6a015bcbacf1debae2f278a2d92306fb055d BUG: 896456 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.org/4366 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.h') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index bd00089fc..65983c0c4 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -214,6 +214,13 @@ enum gf_defrag_status_t { }; typedef enum gf_defrag_status_t gf_defrag_status_t; +typedef struct gf_defrag_pattern_list gf_defrag_pattern_list_t; + +struct gf_defrag_pattern_list { + char path_pattern[256]; + uint64_t size; + gf_defrag_pattern_list_t *next; +}; struct gf_defrag_info_ { uint64_t total_files; @@ -232,7 +239,7 @@ struct gf_defrag_info_ { uuid_t node_uuid; struct timeval start_time; gf_boolean_t stats; - + gf_defrag_pattern_list_t *defrag_pattern; }; typedef struct gf_defrag_info_ gf_defrag_info_t; -- cgit