diff options
| author | Raghavendra G <rgowdapp@redhat.com> | 2015-05-28 16:17:05 +0530 | 
|---|---|---|
| committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-04 04:56:08 -0700 | 
| commit | 0ecd96442f4039835c8820546fd5673266ccb4fa (patch) | |
| tree | 36e99b7e89bf3f9756361dd8c2696784a9c4eba3 /xlators/mount/fuse/src | |
| parent | 0687f25ed4135f4829b7cfa69668934208d48f96 (diff) | |
meta: implement fsync(dir)
Change-Id: I707c608a9803fe6ef86860ca5578d4d3f63fd2aa
BUG: 1225859
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/10970
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mount/fuse/src')
| -rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 10 | 
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,  | 
