diff options
author | ShyamsundarR <srangana@redhat.com> | 2018-09-13 22:15:20 -0400 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-09-17 14:26:06 +0000 |
commit | cee40c3e3c26ebfb3b98109d154501a5cce61c0d (patch) | |
tree | 8b36f23ed64e8b7c9fe4fd884bfba18fe36c2c66 /libglusterfs | |
parent | 5cd9c22a4fd041a27275a465d0117af39cf4e616 (diff) |
gfapi: revert several patchs that introduced pre/post attrs
Reverted the following:
- 248152767b0599986bbb6bb35fc27197f6be6964
- 09943beb499617212f2985ca8ea9ecd1ed1b470e
- d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809
The reverts are redone by hand, due to clang format changes
that made using git to revert the changes more tedious.
Change-Id: I96489638a2b641fb2206a110298543225783f7be
Updates: bz#1628620
Signed-off-by: ShyamsundarR <srangana@redhat.com>
Diffstat (limited to 'libglusterfs')
-rwxr-xr-x | libglusterfs/src/generator.py | 7 | ||||
-rw-r--r-- | libglusterfs/src/syncop.c | 47 | ||||
-rw-r--r-- | libglusterfs/src/syncop.h | 13 |
3 files changed, 12 insertions, 55 deletions
diff --git a/libglusterfs/src/generator.py b/libglusterfs/src/generator.py index c17d450502d..026dfb6c75b 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 *'), @@ -144,8 +142,6 @@ ops['writev'] = ( ('fop-arg', 'off', 'off_t', 'offset'), ('fop-arg', 'flags', 'uint32_t', 'flags'), ('fop-arg', 'iobref', 'struct iobref *'), - ('extra', 'preop', 'struct iatt', '&preop'), - ('extra', 'postop', 'struct iatt', '&postop'), ('fop-arg', 'xdata', 'dict_t *', 'xdata'), ('cbk-arg', 'prebuf', 'struct iatt *'), ('cbk-arg', 'postbuf', 'struct iatt *'), @@ -158,7 +154,6 @@ ops['readv'] = ( ('fop-arg', 'size', 'size_t'), ('fop-arg', 'offset', 'off_t'), ('fop-arg', 'flags', 'uint32_t'), - ('extra', 'iatt', 'struct iatt', '&iatt'), ('fop-arg', 'xdata', 'dict_t *'), ('cbk-arg', 'vector', 'struct iovec *'), ('cbk-arg', 'count', 'int32_t'), @@ -303,8 +298,6 @@ ops['access'] = ( ops['ftruncate'] = ( ('fop-arg', 'fd', 'fd_t *', 'fd'), ('fop-arg', 'offset', 'off_t', 'offset'), - ('extra', 'preop', 'struct iatt', '&preop'), - ('extra', 'postop', 'struct iatt', '&postop'), ('fop-arg', 'xdata', 'dict_t *', 'xdata'), ('cbk-arg', 'prebuf', 'struct iatt *'), ('cbk-arg', 'postbuf', 'struct iatt *'), diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index ec646425d74..2b8a0a68b00 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -1909,7 +1909,6 @@ syncop_readv_cbk(call_frame_t *frame, void *cookie, xlator_t *this, args->iobref = iobref_ref(iobref); args->vector = iov_dup(vector, count); args->count = count; - args->iatt1 = *stbuf; } __wake(args); @@ -1920,7 +1919,7 @@ syncop_readv_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int syncop_readv(xlator_t *subvol, fd_t *fd, size_t size, off_t off, uint32_t flags, struct iovec **vector, int *count, struct iobref **iobref, - struct iatt *iatt, dict_t *xdata_in, dict_t **xdata_out) + dict_t *xdata_in, dict_t **xdata_out) { struct syncargs args = { 0, @@ -1934,9 +1933,6 @@ syncop_readv(xlator_t *subvol, fd_t *fd, size_t size, off_t off, uint32_t flags, else if (args.xdata) dict_unref(args.xdata); - if (iatt) - *iatt = args.iatt1; - if (args.op_ret < 0) goto out; @@ -1974,11 +1970,6 @@ syncop_writev_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, if (xdata) args->xdata = dict_ref(xdata); - if (op_ret >= 0) { - args->iatt1 = *prebuf; - args->iatt2 = *postbuf; - } - __wake(args); return 0; @@ -1987,8 +1978,7 @@ syncop_writev_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int syncop_writev(xlator_t *subvol, fd_t *fd, const struct iovec *vector, int32_t count, off_t offset, struct iobref *iobref, - uint32_t flags, struct iatt *preiatt, struct iatt *postiatt, - dict_t *xdata_in, dict_t **xdata_out) + uint32_t flags, dict_t *xdata_in, dict_t **xdata_out) { struct syncargs args = { 0, @@ -1997,11 +1987,6 @@ syncop_writev(xlator_t *subvol, fd_t *fd, const struct iovec *vector, SYNCOP(subvol, (&args), syncop_writev_cbk, subvol->fops->writev, fd, (struct iovec *)vector, count, offset, flags, iobref, xdata_in); - if (preiatt) - *preiatt = args.iatt1; - if (postiatt) - *postiatt = args.iatt2; - if (xdata_out) *xdata_out = args.xdata; else if (args.xdata) @@ -2330,19 +2315,14 @@ syncop_ftruncate_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; } int -syncop_ftruncate(xlator_t *subvol, fd_t *fd, off_t offset, struct iatt *preiatt, - struct iatt *postiatt, dict_t *xdata_in, dict_t **xdata_out) +syncop_ftruncate(xlator_t *subvol, fd_t *fd, off_t offset, dict_t *xdata_in, + dict_t **xdata_out) { struct syncargs args = { 0, @@ -2351,11 +2331,6 @@ syncop_ftruncate(xlator_t *subvol, fd_t *fd, off_t offset, struct iatt *preiatt, SYNCOP(subvol, (&args), syncop_ftruncate_cbk, subvol->fops->ftruncate, fd, offset, xdata_in); - if (preiatt) - *preiatt = args.iatt1; - if (postiatt) - *postiatt = args.iatt2; - if (xdata_out) *xdata_out = args.xdata; else if (args.xdata) @@ -2401,19 +2376,14 @@ 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; } 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, @@ -2422,11 +2392,6 @@ syncop_fsync(xlator_t *subvol, fd_t *fd, int dataonly, struct iatt *preiatt, 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 d07aed3d53b..88668125d5a 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -488,18 +488,17 @@ syncop_write(xlator_t *subvol, fd_t *fd, const char *buf, int size, int syncop_writev(xlator_t *subvol, fd_t *fd, const struct iovec *vector, int32_t count, off_t offset, struct iobref *iobref, - uint32_t flags, struct iatt *preiatt, struct iatt *postiatt, - dict_t *xdata_in, dict_t **xdata_out); + uint32_t flags, dict_t *xdata_in, dict_t **xdata_out); int syncop_readv(xlator_t *subvol, fd_t *fd, size_t size, off_t off, uint32_t flags, /* out */ struct iovec **vector, int *count, struct iobref **iobref, - struct iatt *iatt, dict_t *xdata_in, dict_t **xdata_out); + dict_t *xdata_in, dict_t **xdata_out); int -syncop_ftruncate(xlator_t *subvol, fd_t *fd, off_t offset, struct iatt *preiatt, - struct iatt *postiatt, dict_t *xdata_in, dict_t **xdata_out); +syncop_ftruncate(xlator_t *subvol, fd_t *fd, off_t offset, dict_t *xdata_in, + dict_t **xdata_out); int syncop_truncate(xlator_t *subvol, loc_t *loc, off_t offset, dict_t *xdata_in, @@ -514,8 +513,8 @@ 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); +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); |