summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-08-08 16:54:12 +0530
committerAnand Avati <avati@gluster.com>2011-08-10 06:53:06 -0700
commiteddb2069f3b0e122cbd034328d87e08e737f4c4e (patch)
treec612bfe1d7a023288a371cb2426d8858f9d56694 /libglusterfs/src
parent1b5a860f159916f0b289069ef3223e6fd754d36b (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/195 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/inode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index b098b2bca..382e97023 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -746,6 +746,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)) {