summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2015-05-27 12:08:54 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-05-27 04:03:18 -0700
commitd6fc353afce03095c98d67d377eb7ddf334fd42e (patch)
treeeb53832214d444be71fe5897b5e4e0008d25d259 /xlators/mount
parent628198deaf0bc3192607a01ccfaa7a605723fa4d (diff)
meta: implement fsync(dir)
Change-Id: I707c608a9803fe6ef86860ca5578d4d3f63fd2aa BUG: 1225323 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/10929 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 871059d5697..605a24c9091 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4420,17 +4420,21 @@ fuse_migrate_fd (xlator_t *this, fd_t *basefd, xlator_t *old_subvol,
}
if (oldfd->inode->table->xl == old_subvol) {
- ret = syncop_fsync (old_subvol, oldfd, 0, NULL, NULL);
+ if (IA_ISDIR (oldfd->inode->ia_type))
+ ret = syncop_fsyncdir (old_subvol, oldfd, 0, NULL,
+ NULL);
+ else
+ ret = syncop_fsync (old_subvol, oldfd, 0, NULL, NULL);
+
if (ret < 0) {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
- "syncop_fsync failed (%s) on fd (%p)"
+ "syncop_fsync(dir) failed (%s) on fd (%p)"
"(basefd:%p basefd-inode.gfid:%s) "
"(old-subvolume:%s-%d new-subvolume:%s-%d)",
strerror (-ret), oldfd, basefd,
uuid_utoa (basefd->inode->gfid),
old_subvol->name, old_subvol->graph->id,
new_subvol->name, new_subvol->graph->id);
- ret = -1;
}
} else {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,