diff options
author | shishir gowda <sgowda@redhat.com> | 2013-01-07 15:50:57 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-27 12:16:07 -0800 |
commit | dafd31b7188057367cb9fb780f921f4bb8a930fb (patch) | |
tree | 485ba049651578b4502f3e40fc2e9694d07043e0 /xlators/cluster/dht/src/dht-common.h | |
parent | ae1a2902c2193cac46813728cdfde6227f8e0379 (diff) |
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.
<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 <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4366
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index bd00089fc2c..65983c0c49f 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; |