diff options
author | Anand Avati <avati@gluster.com> | 2011-02-04 21:43:49 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-22 02:11:57 -0800 |
commit | 23d9783a192669b638d42b8dd127ad69ea36f950 (patch) | |
tree | 2a6828bea0bfb11832128f2181c7202385c19a47 | |
parent | a144f2ca40d43a6ee3a50802fe1e8d1eda7a53b7 (diff) |
dht: do not send revalidates to all subvols
Signed-off-by: Anand Avati <avati@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2450 (scalability enhancements)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2450
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index ef8fb1a602a..3934b465527 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1030,7 +1030,7 @@ dht_lookup (call_frame_t *frame, xlator_t *this, local->inode = inode_ref (loc->inode); local->ia_ino = loc->inode->ino; - local->call_cnt = layout->cnt; + local->call_cnt = 1; call_cnt = local->call_cnt; /* NOTE: we don't require 'trusted.glusterfs.dht.linkto' attribute, @@ -1039,16 +1039,12 @@ dht_lookup (call_frame_t *frame, xlator_t *this, ret = dict_set_uint32 (local->xattr_req, "trusted.glusterfs.dht", 4 * 4); - for (i = 0; i < layout->cnt; i++) { - subvol = layout->list[i].xlator; - - STACK_WIND (frame, dht_revalidate_cbk, - subvol, subvol->fops->lookup, - &local->loc, local->xattr_req); + subvol = local->cached_subvol; + + STACK_WIND (frame, dht_revalidate_cbk, + subvol, subvol->fops->lookup, + &local->loc, local->xattr_req); - if (!--call_cnt) - break; - } } else { do_fresh_lookup: /* TODO: remove the hard-coding */ |