summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-07-01 04:40:05 +0000
committerAnand Avati <avati@gluster.com>2011-07-14 01:01:39 -0700
commit3f76fe277ec0a826bf3052134ad877ee65ce9e79 (patch)
tree802ddcc8c34de9c65563e64635c8ba2ac1f1c59f /xlators/cluster/dht/src/dht-common.h
parent6cf06cfd4bf72b16ac7665323629d354b78b6b05 (diff)
cluster/distribute: bring in directory-spread-count option
global spread count option is given through volume file Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2257 (enhance distribute to control the spread count (ie, control the hashing range)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2257
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index c85ba9cfcc2..43056c78c9f 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -41,6 +41,9 @@ typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
struct dht_layout {
+ int spread_cnt; /* layout spread count per directory,
+ is controlled by 'setxattr()' with
+ special key */
int cnt;
int preset;
int gen;
@@ -171,6 +174,10 @@ struct dht_conf {
char vol_uuid[UUID_SIZE + 1];
gf_boolean_t assert_no_child_down;
time_t *subvol_up_time;
+
+ /* This is the count used as the distribute layout for a directory */
+ /* Will be a global flag to control the layout spread count */
+ uint32_t dir_spread_cnt;
};
typedef struct dht_conf dht_conf_t;