summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2013-09-06 16:13:30 +0530
committerVijay Bellur <vbellur@redhat.com>2013-09-10 01:15:07 -0700
commit49f073ec63d0ede22a390bf1ac33939dd65b6241 (patch)
treec071e3f31d85decc54333895e2fe3ca8f0fce91b /api
parent23f0ad993c5b12e8a8444fa2519864ccfc9cd8cf (diff)
gfapi: store the open/create flags in fd_t object
The flags passed on to open and create calls were not being saved in the fd_t object, hence the fd migration was failing. Change-Id: I486bb818477fe4c393d64a711534a082162a0e53 BUG: 1005159 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/5873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c6
-rw-r--r--api/src/glfs-resolve.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 7cb442b5f60..3aa8ab834fa 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -136,7 +136,8 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
+ glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
@@ -404,7 +405,8 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
+ glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index beb270322eb..1dcaddecd24 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -613,6 +613,7 @@ glfs_migrate_fd_safe (struct glfs *fs, xlator_t *newsubvol, fd_t *oldfd)
goto out;
}
+ newfd->flags = oldfd->flags;
fd_bind (newfd);
out:
if (newinode)