diff options
author | shishir gowda <shishirng@gluster.com> | 2011-04-07 03:35:22 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-04-08 02:35:45 -0700 |
commit | f7fda5b961822551695306757b1bc29b0c30115f (patch) | |
tree | 41c81a80d9c51eaca4cf8e0ba727c46f593b3111 /xlators | |
parent | 2b55a4904590b13ad706c069e73e1f38d92d8085 (diff) |
DHT: send revalidate to all subvols and not just first subvol
Reverting commit 23d9783a192669b638d42b8dd127ad69ea36f950.
When first subvolume is down, mount point becomes inaccessible.
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
BUG: 2532 ([glusterfs-3.1.3qa8]: bringing first subvolume down makes mount point inaccessible)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2532
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 034d78bbcdf..5454bf33efe 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1032,7 +1032,7 @@ dht_lookup (call_frame_t *frame, xlator_t *this, goto do_fresh_lookup; } - local->call_cnt = 1; + local->call_cnt = layout->cnt; call_cnt = local->call_cnt; /* NOTE: we don't require 'trusted.glusterfs.dht.linkto' attribute, @@ -1041,12 +1041,16 @@ dht_lookup (call_frame_t *frame, xlator_t *this, ret = dict_set_uint32 (local->xattr_req, "trusted.glusterfs.dht", 4 * 4); - subvol = local->cached_subvol; - - STACK_WIND (frame, dht_revalidate_cbk, - subvol, subvol->fops->lookup, - &local->loc, local->xattr_req); + 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); + if (!--call_cnt) + break; + } } else { do_fresh_lookup: /* TODO: remove the hard-coding */ |