diff options
author | Raghavendra G <raghavendra@gluster.com> | 2012-03-14 16:13:17 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-03-18 00:34:23 -0700 |
commit | 598ab12c30b44c4c5f5922f3b76eec2ed8872790 (patch) | |
tree | 65119c47ef57bb0410c1d5723e470e6d0927f245 /xlators/mount | |
parent | 642343cc55e6ea2b0d463d77334c34790c30080f (diff) |
mount/fuse-bridge: don't pass flags O_CREAT | O_EXCL during open as part of
fd-migration during graph-switch
Change-Id: Ia1494941d3e3d5bebdba3483b0ea7b32c9704b8c
BUG: 802710
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2943
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 96b3e5f55..77b89f185 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3516,6 +3516,7 @@ fuse_migrate_fd (xlator_t *this, fd_t *fd, xlator_t *old_subvol, loc_t loc = {0, }; char create_in_progress = 0; inode_t *old_inode = NULL; + int flags = 0; /* could've used pthread_cond_wait, but that requires a cond variable to * be mainted for each fd and that is a bit too much overhead. @@ -3581,7 +3582,8 @@ fuse_migrate_fd (xlator_t *this, fd_t *fd, xlator_t *old_subvol, if (IA_ISDIR (fd->inode->ia_type)) { ret = syncop_opendir (new_subvol, &loc, fd); } else { - ret = syncop_open (new_subvol, &loc, fd->flags, fd); + flags = fd->flags & ~(O_CREAT | O_EXCL); + ret = syncop_open (new_subvol, &loc, flags, fd); } if (ret < 0) { |