From a61282f6b9c0c6fab63596b0d92d015027194c50 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 8 Aug 2011 16:54:12 +0530 Subject: fuse-resolve: prevent linking of inodes of different inode-table This can happen in deep_resolve_cbk, which happens after a graph switch. Root cause was because the graph change happened while a FOP was in transit and by the time the call came back, the active translator of fuse is now changed. Fix is to make sure the resolve operation happens on a given inode table, instead of taking the latest graph of fuse for each operation Change-Id: Idd6e2d5c2d5fc5d571f7a1fbc174e210babf8a2b BUG: 3355 Reviewed-on: http://review.gluster.com/194 Tested-by: Gluster Build System Reviewed-by: Shishir Gowda Reviewed-by: Raghavendra Bhat Reviewed-by: Anand Avati --- libglusterfs/src/inode.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 0508525cf4a..eb1f3205908 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -754,6 +754,15 @@ __inode_link (inode_t *inode, inode_t *parent, const char *name, if (!table) return NULL; + if (parent) { + /* We should prevent inode linking between different + inode tables. This can cause errors which is very + hard to catch/debug. */ + if (inode->table != parent->table) { + GF_ASSERT (!"link attempted b/w inodes of diff table"); + } + } + link_inode = inode; if (!__is_inode_hashed (inode)) { -- cgit