summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-11-08 20:54:17 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-09 09:27:58 -0800
commit78a7a092d7a43a7242f863c201a1390b6fbf05b9 (patch)
tree4f67e643ad1b221b0e6ee98e4514cc6c2b722e15
parentd4c61c4fff1c9e8d32d84eb1a552c9070bdc2c6f (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: Ia3ce2e5a042b2d55cddd7bd8cf31a94de6023234 BUG: 3793 Reviewed-on: http://review.gluster.com/688 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
-rw-r--r--xlators/cluster/dht/src/dht-common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 062371db6ae..f2d7252f90b 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1236,6 +1236,17 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
local->inode = inode_ref (loc->inode);
+ 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;
+ }
+
local->call_cnt = layout->cnt;
call_cnt = local->call_cnt;