summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-tests.sh1
-rw-r--r--xlators/meta/src/meta.c46
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c10
3 files changed, 40 insertions, 17 deletions
diff --git a/run-tests.sh b/run-tests.sh
index d924332b073..13108c19af9 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -204,7 +204,6 @@ function is_bad_test ()
./tests/bugs/disperse/bug-1187474.t \
./tests/basic/afr/sparse-file-self-heal.t \
./tests/basic/mount-nfs-auth.t \
- ./tests/performance/open-behind.t \
./tests/basic/ec/ec-5-1.t \
./tests/basic/ec/ec.t \
; do
diff --git a/xlators/meta/src/meta.c b/xlators/meta/src/meta.c
index 20c643f2f75..09ee71b2e9e 100644
--- a/xlators/meta/src/meta.c
+++ b/xlators/meta/src/meta.c
@@ -169,6 +169,24 @@ meta_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
return 0;
}
+int32_t
+meta_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
+ dict_t *xdata)
+{
+ META_FOP (fd->inode, fsync, frame, this, fd, flags, xdata);
+
+ return 0;
+}
+
+int32_t
+meta_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
+ dict_t *xdata)
+{
+ META_FOP (fd->inode, fsyncdir, frame, this, fd, flags, xdata);
+
+ return 0;
+}
+
int
meta_forget (xlator_t *this, inode_t *inode)
{
@@ -235,19 +253,21 @@ fini (xlator_t *this)
struct xlator_fops fops = {
- .lookup = meta_lookup,
- .opendir = meta_opendir,
- .open = meta_open,
- .readv = meta_readv,
- .flush = meta_flush,
- .stat = meta_stat,
- .fstat = meta_fstat,
- .readdir = meta_readdir,
- .readdirp = meta_readdirp,
- .readlink = meta_readlink,
- .writev = meta_writev,
- .truncate = meta_truncate,
- .ftruncate = meta_ftruncate
+ .lookup = meta_lookup,
+ .opendir = meta_opendir,
+ .open = meta_open,
+ .readv = meta_readv,
+ .flush = meta_flush,
+ .stat = meta_stat,
+ .fstat = meta_fstat,
+ .readdir = meta_readdir,
+ .readdirp = meta_readdirp,
+ .readlink = meta_readlink,
+ .writev = meta_writev,
+ .truncate = meta_truncate,
+ .ftruncate = meta_ftruncate,
+ .fsync = meta_fsync,
+ .fsyncdir = meta_fsyncdir
};
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,