From 5493db0d0664b9ed2515758122837c0d93d0f388 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Feb 2010 15:37:59 +0000 Subject: replicate: Restore parent ino from saved inode number Not doing this was resulting in a 0 inode number being returned in postparent on lookup, which in turn results in a ESTALE at the NFS client since an inode number change was observed. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597 --- xlators/cluster/afr/src/afr.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/afr/src/afr.c') diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index c041adc99e0..f4917929c78 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -1003,6 +1003,9 @@ afr_lookup (call_frame_t *frame, xlator_t *this, UNLOCK (&priv->read_child_lock); } + if (loc->parent) + local->cont.lookup.parent_ino = loc->parent->ino; + local->child_up = memdup (priv->child_up, priv->child_count); local->cont.lookup.xattrs = CALLOC (priv->child_count, -- cgit