summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-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,