path: root/libglusterfs
diff options
authorAmar Tumballi <>2011-08-08 16:54:12 +0530
committerAnand Avati <>2011-08-10 06:50:56 -0700
commita61282f6b9c0c6fab63596b0d92d015027194c50 (patch)
treeeec4f94508e2bc2335aa7664df6c61153897c3c9 /libglusterfs
parent62adb4d1c204104314e8d1d843dc8ca6c498dc55 (diff)
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: Tested-by: Gluster Build System <> Reviewed-by: Shishir Gowda <> Reviewed-by: Raghavendra Bhat <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'libglusterfs')
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 0508525..eb1f320 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)) {