diff options
author | ShyamsundarR <srangana@redhat.com> | 2018-05-08 11:03:55 -0400 |
---|---|---|
committer | ShyamsundarR <srangana@redhat.com> | 2018-05-08 11:27:48 -0400 |
commit | 427951b7f74c643d5b7c7c946bc348209b974274 (patch) | |
tree | 06dbb1fb1c0f8b11c7d00a1b196219967be68237 /api/src/glfs-fops.c | |
parent | acaea514b6c31099e657224adb116a96070d51a2 (diff) |
Revert "gfapi: return pre/post attributes from glfs_fsync/fdatasync"
This reverts commit 09943beb499617212f2985ca8ea9ecd1ed1b470e.
This is being reverted as the API signatures should adapt to a
statx like structure, and also all APIs that need to return
pre/post attrs are not complete.
As a result, instead of fixing up part of the APIs and then
refixing the same in a later release, removing these set of
fixes from the branch.
Updates: bz#1575386
Change-Id: I3e0803c114dc6b9126d8a90f43812bca501e6338
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r-- | api/src/glfs-fops.c | 69 |
1 files changed, 10 insertions, 59 deletions
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 |