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>
This commit is contained in:
Raghavendra G 2012-03-14 16:13:17 +05:30 committed by Anand Avati
parent 642343cc55
commit 598ab12c30

View File

@ -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) {