From cee40c3e3c26ebfb3b98109d154501a5cce61c0d Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Thu, 13 Sep 2018 22:15:20 -0400 Subject: 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 --- xlators/cluster/afr/src/afr-self-heal-data.c | 6 +++--- xlators/cluster/dht/src/dht-rebalance.c | 19 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index a477fae8039..f1b9eddf21c 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -134,7 +134,7 @@ __afr_is_sink_zero_filled(xlator_t *this, fd_t *fd, size_t size, off_t offset, priv = this->private; ret = syncop_readv(priv->children[sink], fd, size, offset, 0, &iovec, - &count, &iobref, NULL, NULL, NULL); + &count, &iobref, NULL, NULL); if (ret < 0) goto out; ret = iov_0filled(iovec, count); @@ -164,7 +164,7 @@ __afr_selfheal_data_read_write(call_frame_t *frame, xlator_t *this, fd_t *fd, priv = this->private; ret = syncop_readv(priv->children[source], fd, size, offset, 0, &iovec, - &count, &iobref, NULL, NULL, NULL); + &count, &iobref, NULL, NULL); if (ret <= 0) return ret; @@ -212,7 +212,7 @@ __afr_selfheal_data_read_write(call_frame_t *frame, xlator_t *this, fd_t *fd, } ret = syncop_writev(priv->children[i], fd, iovec, count, offset, iobref, - 0, NULL, NULL, NULL, NULL); + 0, NULL, NULL); if (ret != iov_length(iovec, count)) { /* write() failed on this sink. unset the corresponding member in sinks[] (which is healed_sinks[] in the diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 7a2539dc5f5..a00200f0ca3 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -835,7 +835,7 @@ __dht_rebalance_create_dst_file(xlator_t *this, xlator_t *to, xlator_t *from, /* fallocate does not release the space * in some cases */ - ret2 = syncop_ftruncate(to, fd, 0, NULL, NULL, NULL, NULL); + ret2 = syncop_ftruncate(to, fd, 0, NULL, NULL); if (ret2 < 0) { gf_msg(this->name, GF_LOG_WARNING, -ret2, DHT_MSG_MIGRATE_FILE_FAILED, @@ -849,8 +849,7 @@ __dht_rebalance_create_dst_file(xlator_t *this, xlator_t *to, xlator_t *from, } if (!conf->use_fallocate) { - ret = syncop_ftruncate(to, fd, stbuf->ia_size, NULL, NULL, NULL, - NULL); + ret = syncop_ftruncate(to, fd, stbuf->ia_size, NULL, NULL); if (ret < 0) { *fop_errno = -ret; gf_msg(this->name, GF_LOG_WARNING, -ret, @@ -1118,7 +1117,7 @@ __dht_rebalance_migrate_data(xlator_t *this, gf_defrag_info_t *defrag, : (ia_size - total)); ret = syncop_readv(from, src, read_size, offset, 0, &vector, &count, - &iobref, NULL, NULL, NULL); + &iobref, NULL, NULL); if (!ret || (ret < 0)) { *fop_errno = -ret; break; @@ -1158,8 +1157,8 @@ __dht_rebalance_migrate_data(xlator_t *this, gf_defrag_info_t *defrag, } } - ret = syncop_writev(to, dst, vector, count, offset, iobref, 0, NULL, - NULL, xdata, NULL); + ret = syncop_writev(to, dst, vector, count, offset, iobref, 0, + xdata, NULL); if (ret < 0) { *fop_errno = -ret; } @@ -1758,7 +1757,7 @@ dht_migrate_file(xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to, goto out; } - ret = syncop_ftruncate(to, dst_fd, 0, NULL, NULL, NULL, NULL); + ret = syncop_ftruncate(to, dst_fd, 0, NULL, NULL); if (ret) { gf_log(this->name, GF_LOG_WARNING, "%s: failed to perform truncate on %s (%s)", loc->path, @@ -1883,7 +1882,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)", loc->path, to->name, strerror(-ret)); @@ -2170,7 +2169,7 @@ dht_migrate_file(xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to, /* Free up the data blocks on the source node, as the whole file is migrated */ - ret = syncop_ftruncate(from, src_fd, 0, NULL, NULL, NULL, NULL); + ret = syncop_ftruncate(from, src_fd, 0, NULL, NULL); if (ret) { gf_log(this->name, GF_LOG_WARNING, "%s: failed to perform truncate on %s (%s)", loc->path, @@ -2292,7 +2291,7 @@ out: /* reset the destination back to 0 */ if (clean_dst) { - lk_ret = syncop_ftruncate(to, dst_fd, 0, NULL, NULL, NULL, NULL); + lk_ret = syncop_ftruncate(to, dst_fd, 0, NULL, NULL); if (lk_ret) { gf_msg(this->name, GF_LOG_ERROR, -lk_ret, DHT_MSG_MIGRATE_FILE_FAILED, -- cgit