From 427951b7f74c643d5b7c7c946bc348209b974274 Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Tue, 8 May 2018 11:03:55 -0400 Subject: 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 --- libglusterfs/src/generator.py | 2 -- libglusterfs/src/syncop.c | 14 ++------------ libglusterfs/src/syncop.h | 5 ++--- 3 files changed, 4 insertions(+), 17 deletions(-) (limited to 'libglusterfs') 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); -- cgit