diff options
| author | Kinglong Mee <kinglongmee@gmail.com> | 2018-02-01 10:13:07 +0800 | 
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2018-02-12 21:34:46 +0000 | 
| commit | 248152767b0599986bbb6bb35fc27197f6be6964 (patch) | |
| tree | f18550ce89d0786cc21dca474d187d45a49017fb /xlators/cluster/dht/src | |
| parent | 09943beb499617212f2985ca8ea9ecd1ed1b470e (diff) | |
gfapi: return pre/post attributes from glfs_ftruncate
Updates: #389
Change-Id: I8faea0828921fb17f05f7321c3cb01747373f21e
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'xlators/cluster/dht/src')
| -rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 5bd81244b74..901575563f8 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -876,6 +876,7 @@ __dht_rebalance_create_dst_file (xlator_t *this, xlator_t *to, xlator_t *from,                                           * in some cases                                           */                                          ret2 = syncop_ftruncate (to, fd, 0, +                                                                 NULL, NULL,                                                                   NULL, NULL);                                          if (ret2 < 0) {                                                  gf_msg (this->name, @@ -891,7 +892,8 @@ __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); +                        ret = syncop_ftruncate (to, fd, stbuf->ia_size, NULL, +                                                NULL, NULL, NULL);                          if (ret < 0) {                                  *fop_errno = -ret;                                  gf_msg (this->name, GF_LOG_WARNING, -ret, @@ -1767,7 +1769,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,                  } -                ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL); +                ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL, NULL, NULL);                  if (ret) {                          gf_log (this->name, GF_LOG_WARNING,                                  "%s: failed to perform truncate on %s (%s)", @@ -2199,7 +2201,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); +        ret = syncop_ftruncate (from, src_fd, 0, NULL, NULL, NULL, NULL);          if (ret) {                  gf_log (this->name, GF_LOG_WARNING,                          "%s: failed to perform truncate on %s (%s)", @@ -2332,7 +2334,8 @@ out:          /* reset the destination back to 0 */          if (clean_dst) { -                lk_ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL); +                lk_ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL, +                                           NULL, NULL);                  if (lk_ret) {                          gf_msg (this->name, GF_LOG_ERROR, -lk_ret,                                  DHT_MSG_MIGRATE_FILE_FAILED,  | 
