summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/gfapi.aliases6
-rw-r--r--api/src/gfapi.map4
-rw-r--r--api/src/glfs-fops.c69
-rw-r--r--api/src/glfs-resolve.c2
-rw-r--r--api/src/glfs.h10
-rwxr-xr-xlibglusterfs/src/generator.py2
-rw-r--r--libglusterfs/src/syncop.c14
-rw-r--r--libglusterfs/src/syncop.h5
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
-rw-r--r--xlators/experimental/jbr-server/src/jbr.c2
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c3
11 files changed, 26 insertions, 93 deletions
diff --git a/api/src/gfapi.aliases b/api/src/gfapi.aliases
index 8b774f09754..4b3bcc1fb54 100644
--- a/api/src/gfapi.aliases
+++ b/api/src/gfapi.aliases
@@ -39,9 +39,9 @@ _pub_glfs_ftruncate_async _glfs_ftruncate_async$GFAPI_3.4.0
_pub_glfs_lstat _glfs_lstat$GFAPI_3.4.0
_pub_glfs_stat _glfs_stat$GFAPI_3.4.0
_pub_glfs_fstat _glfs_fstat$GFAPI_3.4.0
-_pub_glfs_fsync34 _glfs_fsync34$GFAPI_3.4.0
+_pub_glfs_fsync _glfs_fsync$GFAPI_3.4.0
_pub_glfs_fsync_async _glfs_fsync_async$GFAPI_3.4.0
-_pub_glfs_fdatasync34 _glfs_fdatasync34$GFAPI_3.4.0
+_pub_glfs_fdatasync _glfs_fdatasync$GFAPI_3.4.0
_pub_glfs_fdatasync_async _glfs_fdatasync_async$GFAPI_3.4.0
_pub_glfs_access _glfs_access$GFAPI_3.4.0
_pub_glfs_symlink _glfs_symlink$GFAPI_3.4.0
@@ -175,5 +175,3 @@ _pub_glfs_h_lease _glfs_h_lease$GFAPI_4.0.0
_pub_glfs_recall_lease _glfs_recall_lease$GFAPI_4.0.0
_pub_glfs_pread _glfs_pread$GFAPI_4.0.0
_pub_glfs_pwrite _glfs_pwrite$GFAPI_4.0.0
-_pub_glfs_fsync _glfs_fsync$GFAPI_4.0.0
-_pub_glfs_fdatasync _glfs_fdatasync$GFAPI_4.0.0
diff --git a/api/src/gfapi.map b/api/src/gfapi.map
index 03ecee811da..09de5fada3a 100644
--- a/api/src/gfapi.map
+++ b/api/src/gfapi.map
@@ -42,7 +42,9 @@ GFAPI_3.4.0 {
glfs_lstat;
glfs_stat;
glfs_fstat;
+ glfs_fsync;
glfs_fsync_async;
+ glfs_fdatasync;
glfs_fdatasync_async;
glfs_access;
glfs_symlink;
@@ -224,6 +226,4 @@ GFAPI_4.0.0 {
glfs_recall_lease;
glfs_pread;
glfs_pwrite;
- glfs_fsync;
- glfs_fdatasync;
} GFAPI_3.13.0;
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index f314c36463d..35a6a6628e8 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -1502,14 +1502,12 @@ pub_glfs_writev_async (struct glfs_fd *glfd, const struct iovec *iov, int count,
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_writev_async, 3.4.0);
-static int
-glfs_fsync_common (struct glfs_fd *glfd, struct stat *prestat,
- struct stat *poststat)
+int
+pub_glfs_fsync (struct glfs_fd *glfd)
{
int ret = -1;
xlator_t *subvol = NULL;
fd_t *fd = NULL;
- struct iatt preiatt = {0, }, postiatt = {0, };
dict_t *fop_attr = NULL;
DECLARE_OLD_THIS;
@@ -1535,15 +1533,9 @@ glfs_fsync_common (struct glfs_fd *glfd, struct stat *prestat,
if (ret)
gf_msg_debug ("gfapi", 0, "Getting leaseid from thread failed");
- ret = syncop_fsync (subvol, fd, 0, &preiatt, &postiatt, fop_attr, NULL);
- DECODE_SYNCOP_ERR (ret);
+ ret = syncop_fsync (subvol, fd, 0, fop_attr, NULL);
- if (ret >= 0) {
- if (prestat)
- glfs_iatt_to_stat (glfd->fs, &preiatt, prestat);
- if (poststat)
- glfs_iatt_to_stat (glfd->fs, &postiatt, poststat);
- }
+ DECODE_SYNCOP_ERR (ret);
out:
if (fd)
fd_unref (fd);
@@ -1560,24 +1552,7 @@ invalid_fs:
return ret;
}
-int
-pub_glfs_fsync34 (struct glfs_fd *glfd)
-{
- return glfs_fsync_common (glfd, NULL, NULL);
-}
-
-GFAPI_SYMVER_PUBLIC(glfs_fsync34, glfs_fsync, 3.4.0);
-
-
-int
-pub_glfs_fsync (struct glfs_fd *glfd, struct stat *prestat,
- struct stat *poststat)
-{
- return glfs_fsync_common (glfd, prestat, poststat);
-}
-
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync, 4.0.0);
-
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync, 3.4.0);
static int
glfs_fsync_async_cbk (call_frame_t *frame, void *cookie,
@@ -1678,14 +1653,12 @@ invalid_fs:
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync_async, 3.4.0);
-static int
-glfs_fdatasync_common (struct glfs_fd *glfd, struct stat *prestat,
- struct stat *poststat)
+int
+pub_glfs_fdatasync (struct glfs_fd *glfd)
{
int ret = -1;
xlator_t *subvol = NULL;
fd_t *fd = NULL;
- struct iatt preiatt = {0, }, postiatt = {0, };
dict_t *fop_attr = NULL;
DECLARE_OLD_THIS;
@@ -1711,15 +1684,9 @@ glfs_fdatasync_common (struct glfs_fd *glfd, struct stat *prestat,
if (ret)
gf_msg_debug ("gfapi", 0, "Getting leaseid from thread failed");
- ret = syncop_fsync (subvol, fd, 1, &preiatt, &postiatt, fop_attr, NULL);
- DECODE_SYNCOP_ERR (ret);
+ ret = syncop_fsync (subvol, fd, 1, fop_attr, NULL);
- if (ret >= 0) {
- if (prestat)
- glfs_iatt_to_stat (glfd->fs, &preiatt, prestat);
- if (poststat)
- glfs_iatt_to_stat (glfd->fs, &postiatt, poststat);
- }
+ DECODE_SYNCOP_ERR (ret);
out:
if (fd)
fd_unref (fd);
@@ -1736,23 +1703,7 @@ invalid_fs:
return ret;
}
-int
-pub_glfs_fdatasync34 (struct glfs_fd *glfd)
-{
- return glfs_fdatasync_common (glfd, NULL, NULL);
-}
-
-GFAPI_SYMVER_PUBLIC(glfs_fdatasync34, glfs_fdatasync, 3.4.0);
-
-
-int
-pub_glfs_fdatasync (struct glfs_fd *glfd, struct stat *prestat,
- struct stat *poststat)
-{
- return glfs_fdatasync_common (glfd, prestat, poststat);
-}
-
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync, 4.0.0);
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync, 3.4.0);
int
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 03be7c7eda7..6c9fc38901f 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -730,7 +730,7 @@ glfs_migrate_fd_safe (struct glfs *fs, xlator_t *newsubvol, fd_t *oldfd)
return fd_ref (oldfd);
if (!oldsubvol->switched) {
- ret = syncop_fsync (oldsubvol, oldfd, 0, NULL, NULL, NULL, NULL);
+ ret = syncop_fsync (oldsubvol, oldfd, 0, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret) {
gf_msg (fs->volname, GF_LOG_WARNING, errno,
diff --git a/api/src/glfs.h b/api/src/glfs.h
index 97331d2398c..c174f53dfaa 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -584,15 +584,13 @@ int glfs_stat (glfs_t *fs, const char *path, struct stat *buf) __THROW
int glfs_fstat (glfs_fd_t *fd, struct stat *buf) __THROW
GFAPI_PUBLIC(glfs_fstat, 3.4.0);
-int glfs_fsync (glfs_fd_t *fd, struct stat *prestat,
- struct stat *poststat) __THROW
- GFAPI_PUBLIC(glfs_fsync, 4.0.0);
+int glfs_fsync (glfs_fd_t *fd) __THROW
+ GFAPI_PUBLIC(glfs_fsync, 3.4.0);
int glfs_fsync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_fsync_async, 3.4.0);
-int glfs_fdatasync (glfs_fd_t *fd, struct stat *prestat,
- struct stat *poststat) __THROW
- GFAPI_PUBLIC(glfs_fdatasync, 4.0.0);
+int glfs_fdatasync (glfs_fd_t *fd) __THROW
+ GFAPI_PUBLIC(glfs_fdatasync, 3.4.0);
int glfs_fdatasync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_fdatasync_async, 3.4.0);
diff --git a/libglusterfs/src/generator.py b/libglusterfs/src/generator.py
index d8afd2e11cf..bfa774b1ef5 100755
--- a/libglusterfs/src/generator.py
+++ b/libglusterfs/src/generator.py
@@ -123,8 +123,6 @@ ops['fstat'] = (
ops['fsync'] = (
('fop-arg', 'fd', 'fd_t *'),
('fop-arg', 'flags', 'int32_t'),
- ('extra', 'preop', 'struct iatt', '&preop'),
- ('extra', 'postop', 'struct iatt', '&postop'),
('fop-arg', 'xdata', 'dict_t *'),
('cbk-arg', 'prebuf', 'struct iatt *'),
('cbk-arg', 'postbuf', 'struct iatt *'),
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 4fb55c2b4ab..d0e1ae10774 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -2405,11 +2405,6 @@ syncop_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (xdata)
args->xdata = dict_ref (xdata);
- if (op_ret >= 0) {
- args->iatt1 = *prebuf;
- args->iatt2 = *postbuf;
- }
-
__wake (args);
return 0;
@@ -2417,19 +2412,14 @@ syncop_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
int
-syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly, struct iatt *preiatt,
- struct iatt *postiatt, dict_t *xdata_in, dict_t **xdata_out)
+syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly, dict_t *xdata_in,
+ dict_t **xdata_out)
{
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fsync_cbk, subvol->fops->fsync,
fd, dataonly, xdata_in);
- if (preiatt)
- *preiatt = args.iatt1;
- if (postiatt)
- *postiatt = args.iatt2;
-
if (xdata_out)
*xdata_out = args.xdata;
else if (args.xdata)
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h
index e99ca8aa7ae..fb6b3da86a0 100644
--- a/libglusterfs/src/syncop.h
+++ b/libglusterfs/src/syncop.h
@@ -483,9 +483,8 @@ int syncop_unlink (xlator_t *subvol, loc_t *loc, dict_t *xdata_in,
int syncop_rmdir (xlator_t *subvol, loc_t *loc, int flags, dict_t *xdata_in,
dict_t **xdata_out);
-int syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly,
- struct iatt *preiatt, struct iatt *postiatt,
- dict_t *xdata_in, dict_t **xdata_out);
+int syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly, dict_t *xdata_in,
+ dict_t **xdata_out);
int syncop_flush (xlator_t *subvol, fd_t *fd, dict_t *xdata_in,
dict_t **xdata_out);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index c5f68f8adf3..6f29f91913f 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1897,7 +1897,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
/* TODO: Sync the locks */
- ret = syncop_fsync (to, dst_fd, 0, NULL, NULL, NULL, NULL);
+ ret = syncop_fsync (to, dst_fd, 0, NULL, NULL);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"%s: failed to fsync on %s (%s)",
diff --git a/xlators/experimental/jbr-server/src/jbr.c b/xlators/experimental/jbr-server/src/jbr.c
index 68ec10a7e54..151ba57ab4c 100644
--- a/xlators/experimental/jbr-server/src/jbr.c
+++ b/xlators/experimental/jbr-server/src/jbr.c
@@ -940,7 +940,7 @@ jbr_flush_thread (void *ctx)
list_for_each_entry_safe (fd_ctx, fd_tmp, &dirty_fds, fd_list) {
ret = syncop_fsync(FIRST_CHILD(this), fd_ctx->fd, 0,
- NULL, NULL, NULL, NULL);
+ NULL, NULL);
if (ret) {
gf_msg (this->name, GF_LOG_WARNING, 0,
J_MSG_SYS_CALL_FAILURE,
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 322b4deeffa..3137f19c170 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4666,8 +4666,7 @@ fuse_migrate_fd (xlator_t *this, fd_t *basefd, xlator_t *old_subvol,
ret = syncop_fsyncdir (old_subvol, oldfd, 0, NULL,
NULL);
else
- ret = syncop_fsync (old_subvol, oldfd, 0, NULL, NULL,
- NULL, NULL);
+ ret = syncop_fsync (old_subvol, oldfd, 0, NULL, NULL);
if (ret < 0) {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,