diff options
author | Amar Tumballi <amar@gluster.com> | 2011-08-08 16:54:12 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-08-10 06:50:56 -0700 |
commit | a61282f6b9c0c6fab63596b0d92d015027194c50 (patch) | |
tree | eec4f94508e2bc2335aa7664df6c61153897c3c9 /libglusterfs/src | |
parent | 62adb4d1c204104314e8d1d843dc8ca6c498dc55 (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: http://review.gluster.com/194
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/inode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 0508525cf..eb1f32059 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)) { |