summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-04-18 12:30:17 +0530
committerAnand Avati <avati@redhat.com>2012-05-15 17:09:58 -0700
commit7503c63ee141931556cf066b9b255fc62cefcb68 (patch)
treee96959e64123841fa3788ae97c7f237435f10047 /xlators/mount/fuse/src/fuse-bridge.h
parent4b94890c9777e7d78881d6c72ff739c91a9d3e99 (diff)
fuse-resolve: Attempt fd-migration in resolver, if migration
was never attempted. Since fd is always associated with an inode, we can create an fd only after resolver resolves an inode. So, there is a possibility that graph-switch can happen after resolver kicks in, but before it can complete, thereby resulting in the newly created fd not migrated to new graph. So, instead of migrating fds only during graph-switch, we give a second chance during fd-resolution. As an example, consider following sequence of events during a create call: 1. create wants to resolve parent inode, hence it starts resolution for parent 2. graph-switch happens (it can happen since fuse-request reader thread returns after winding lookup calls) 3. fd-migration of all the fds which are currently in fdtable is attempted (Note that the fd corresponding to current create call is not yet created and added to fd-table, hence it will not be migrated as part of graph switch) 4. resolution of parent triggered as part of create, completes 5. fd is created in fuse_create_resume and this fd is not migrated to new graph 6. Any future fops on this fd will fail with EBADF errors (create call itself will succeed) Change-Id: Iae06ecfaca24eaacb2e166ffefbbbb57446332ba BUG: 804592 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3181 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h
index 3711ca54da0..c13c2dc76fe 100644
--- a/xlators/mount/fuse/src/fuse-bridge.h
+++ b/xlators/mount/fuse/src/fuse-bridge.h
@@ -350,8 +350,8 @@ inode_t *fuse_ino_to_inode (uint64_t ino, xlator_t *fuse);
int send_fuse_err (xlator_t *this, fuse_in_header_t *finh, int error);
int fuse_gfid_set (fuse_state_t *state);
int fuse_flip_xattr_ns (struct fuse_private *priv, char *okey, char **nkey);
-fuse_fd_ctx_t * __fuse_fd_ctx_check_n_create (fd_t *fd, xlator_t *this);
-fuse_fd_ctx_t * fuse_fd_ctx_check_n_create (fd_t *fd, xlator_t *this);
+fuse_fd_ctx_t * __fuse_fd_ctx_check_n_create (xlator_t *this, fd_t *fd);
+fuse_fd_ctx_t * fuse_fd_ctx_check_n_create (xlator_t *this, fd_t *fd);
int fuse_resolve_and_resume (fuse_state_t *state, fuse_resume_fn_t fn);
int fuse_resolve_inode_init (fuse_state_t *state, fuse_resolve_t *resolve,