From 78a7a092d7a43a7242f863c201a1390b6fbf05b9 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 8 Nov 2011 20:54:17 +0530 Subject: 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 Reviewed-by: Amar Tumballi --- xlators/cluster/dht/src/dht-common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 062371db6..f2d7252f9 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; -- cgit