From 1955f7dc84239f23660e23e637f9ddcc672cbeb7 Mon Sep 17 00:00:00 2001 From: Poornima Date: Fri, 6 Sep 2013 16:13:30 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/5837 Reviewed-by: Amar Tumballi Reviewed-by: Raghavendra Bhat Tested-by: Gluster Build System Reviewed-by: Anand Avati --- api/src/glfs-fops.c | 2 ++ api/src/glfs-resolve.c | 1 + 2 files changed, 3 insertions(+) (limited to 'api') diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index 3191ed700..8df237fd3 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -137,6 +137,7 @@ out: glfs_fd_destroy (glfd); glfd = NULL; } else if (glfd) { + glfd->fd->flags = flags; fd_bind (glfd->fd); glfs_fd_bind (glfd); } @@ -414,6 +415,7 @@ out: glfs_fd_destroy (glfd); glfd = NULL; } 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 104fc9e48..3179af22c 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -632,6 +632,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) -- cgit