summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-11-09 14:20:10 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 01:32:11 -0800
commita1fd4c9916cc56c10f83b2a1aa7ecee4d563f82a (patch)
tree9565b49fa93b0a54985854598bad3dbf8c252c1f /xlators/cluster/dht
parent62088ee6a8d2413c828409dec09e31d600987110 (diff)
cluster/distribute lookup: send revalidate calls to all subvols for directories
If mkdir fails on a subvolume, layout is set taking into account only the subvols where it was successful. stat does not trigger selfheal, as its layout based. Revalidate on directories needs to be sent to all subvols, to fix the error, and not just on the layout. Change-Id: If17055508ffcf268806258ed49e7d7500a89d0f2 BUG: 3793 Reviewed-on: http://review.gluster.com/693 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-common.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 109bc77f208..faf575df9af 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1113,14 +1113,25 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
local->inode = inode_ref (loc->inode);
- call_cnt = local->call_cnt = layout->cnt;
-
/* NOTE: we don't require 'trusted.glusterfs.dht.linkto' attribute,
* revalidates directly go to the cached-subvolume.
*/
ret = dict_set_uint32 (local->xattr_req,
"trusted.glusterfs.dht", 4 * 4);
+ if (IA_ISDIR (local->inode->ia_type)) {
+ local->call_cnt = call_cnt = conf->subvolume_cnt;
+ for (i = 0; i < call_cnt; i++) {
+ STACK_WIND (frame, dht_revalidate_cbk,
+ conf->subvolumes[i],
+ conf->subvolumes[i]->fops->lookup,
+ loc, local->xattr_req);
+ }
+ return 0;
+ }
+
+ call_cnt = local->call_cnt = layout->cnt;
+
/* need it for self-healing linkfiles which is
'in-migration' state */
ret = dict_set_uint32 (local->xattr_req,