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 /xlators | |
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 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 6 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 19 | ||||
-rwxr-xr-x | xlators/experimental/fdl/src/gen_recon.py | 2 | ||||
-rw-r--r-- | xlators/experimental/jbr-server/src/jbr.c | 3 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot.c | 2 | ||||
-rw-r--r-- | xlators/features/cloudsync/src/cloudsync.c | 3 | ||||
-rw-r--r-- | xlators/features/snapview-server/src/snapview-server.c | 14 | ||||
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 2 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-entry-ops.c | 4 |
9 files changed, 32 insertions, 23 deletions
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, diff --git a/xlators/experimental/fdl/src/gen_recon.py b/xlators/experimental/fdl/src/gen_recon.py index 0766f61320a..4b695d2e770 100755 --- a/xlators/experimental/fdl/src/gen_recon.py +++ b/xlators/experimental/fdl/src/gen_recon.py @@ -142,7 +142,7 @@ def get_special_subs (name, args, fop_type): # is not stored in or read from the journal. There are other ways to # do that, but this is the only place we need anything similar and we # already have to treat it as a special case so this is simplest. - s_args_str = 'fd, &vector, 1, off, iobref, flags, &preop, &postop, xdata' + s_args_str = 'fd, &vector, 1, off, iobref, flags, xdata' elif name == 'symlink': # Swap 'linkpath' and 'loc'. s_args_str = '&loc, linkpath, &iatt, xdata' diff --git a/xlators/experimental/jbr-server/src/jbr.c b/xlators/experimental/jbr-server/src/jbr.c index 49d7eb467f7..0d42740e504 100644 --- a/xlators/experimental/jbr-server/src/jbr.c +++ b/xlators/experimental/jbr-server/src/jbr.c @@ -902,8 +902,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); + ret = syncop_fsync(FIRST_CHILD(this), fd_ctx->fd, 0, NULL, NULL); if (ret) { gf_msg(this->name, GF_LOG_WARNING, 0, J_MSG_SYS_CALL_FAILURE, "failed to fsync %p (%d)", fd_ctx->fd, -ret); diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c index 75fa0490c90..40932268c9b 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot.c @@ -296,7 +296,7 @@ br_object_read_block_and_sign(xlator_t *this, fd_t *fd, br_child_t *child, tbf = priv->tbf; ret = syncop_readv(child->xl, fd, size, offset, 0, &iovec, &count, &iobref, - NULL, NULL, NULL); + NULL, NULL); if (ret < 0) { gf_msg(this->name, GF_LOG_ERROR, errno, BRB_MSG_READV_FAILED, diff --git a/xlators/features/cloudsync/src/cloudsync.c b/xlators/features/cloudsync/src/cloudsync.c index 00437aaf80c..cb2cefa4d01 100644 --- a/xlators/features/cloudsync/src/cloudsync.c +++ b/xlators/features/cloudsync/src/cloudsync.c @@ -915,8 +915,7 @@ cs_download_task(void *arg) local->remotepath); /*using dlfd as it is anonymous and have RDWR flag*/ - ret = syncop_ftruncate(FIRST_CHILD(this), local->dlfd, 0, NULL, NULL, - NULL, NULL); + ret = syncop_ftruncate(FIRST_CHILD(this), local->dlfd, 0, NULL, NULL); if (ret) { gf_msg(this->name, GF_LOG_ERROR, 0, -ret, "ftruncate failed"); } else { diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index b00a1222026..266a02c8c60 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -2255,7 +2255,7 @@ svs_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, goto out; } - ret = glfs_pread(glfd, iobuf->ptr, size, offset, 0, &fstatbuf); + ret = glfs_pread(glfd, iobuf->ptr, size, offset, 0); if (ret < 0) { op_ret = -1; op_errno = errno; @@ -2270,6 +2270,18 @@ svs_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, iobref = iobref_new(); iobref_add(iobref, iobuf); + + ret = glfs_fstat(glfd, &fstatbuf); + if (ret) { + op_ret = -1; + op_errno = errno; + gf_log(this->name, GF_LOG_ERROR, + "glfs_fstat failed after " + "readv on %s", + uuid_utoa(fd->inode->gfid)); + goto out; + } + iatt_from_stat(&stbuf, &fstatbuf); gf_uuid_copy(stbuf.ia_gfid, fd->inode->gfid); svs_fill_ino_from_gfid(&stbuf); diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index e4e64dd4a96..5e208f36175 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -4620,7 +4620,7 @@ fuse_migrate_fd(xlator_t *this, fd_t *basefd, xlator_t *old_subvol, if (IA_ISDIR(oldfd->inode->ia_type)) 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, diff --git a/xlators/storage/posix/src/posix-entry-ops.c b/xlators/storage/posix/src/posix-entry-ops.c index 1888de7db9b..0e998b20f9f 100644 --- a/xlators/storage/posix/src/posix-entry-ops.c +++ b/xlators/storage/posix/src/posix-entry-ops.c @@ -2293,8 +2293,8 @@ posix_put(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, goto out; } - op_ret = syncop_writev(this, fd, vector, count, offset, iobref, flags, NULL, - NULL, xdata, NULL); + op_ret = syncop_writev(this, fd, vector, count, offset, iobref, flags, + xdata, NULL); if (op_ret < 0) { op_errno = errno; gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_WRITE_FAILED, |