diff options
author | shishir gowda <sgowda@redhat.com> | 2012-08-07 12:55:31 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-08-13 23:24:04 -0700 |
commit | e404e9b81f18c0a36a5c67ebf041ac0a00ca2eb1 (patch) | |
tree | d0d1abbbfcd100814487cb1692487a6c98989c45 /xlators/cluster/dht/src/dht.c | |
parent | cdf6ad3695b0842acc3d4aadc5ebb474f07e8913 (diff) |
cluster/dht: Optimize readdirp calls in DHT
Bring in option which is supported by posix xlator
to filter out directory's entries from being returned.
DHT would now request non-first subvols to filter out
directory entries.
dht xlator-option readdir-optimize will enable this
optimization
Change-Id: I35224bc81c9657f54f952efac02790276c35ded5
BUG: 838199
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.com/3772
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht.c')
-rw-r--r-- | xlators/cluster/dht/src/dht.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 6b156c1d354..a802d895d03 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -329,6 +329,8 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("directory-layout-spread", conf->dir_spread_cnt, options, uint32, out); + GF_OPTION_RECONF ("readdir-optimize", conf->readdir_optimize, options, + bool, out); if (conf->defrag) { GF_OPTION_RECONF ("rebalance-stats", conf->defrag->stats, options, bool, out); @@ -435,6 +437,8 @@ init (xlator_t *this) GF_OPTION_INIT ("assert-no-child-down", conf->assert_no_child_down, bool, err); + GF_OPTION_INIT ("readdir-optimize", conf->readdir_optimize, bool, err); + if (defrag) { GF_OPTION_INIT ("rebalance-stats", defrag->stats, bool, err); } @@ -603,6 +607,10 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_BOOL, .default_value = "off", }, + { .key = {"readdir-optimize"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + }, { .key = {NULL} }, }; |