diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-read.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht-inode-read.c | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-read.c b/xlators/cluster/dht/src/dht-inode-read.c index 46df5b6ea99..5dd055a9dcf 100644 --- a/xlators/cluster/dht/src/dht-inode-read.c +++ b/xlators/cluster/dht/src/dht-inode-read.c @@ -158,7 +158,7 @@ dht_file_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          /* Check if the rebalance phase2 is true */          if ((op_ret == -1) || IS_DHT_MIGRATION_PHASE2 (stbuf)) {                  inode = (local->fd) ? local->fd->inode : local->loc.inode; -                ret = dht_inode_ctx_get1 (this, inode, &subvol); +                ret = dht_inode_ctx_get_mig_info (this, inode, NULL, &subvol);                  if (!subvol) {                          /* Phase 2 of migration */                          local->rebalance.target_op_fn = dht_attr2; @@ -382,7 +382,6 @@ dht_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  {          dht_local_t *local      = NULL;          int          ret        = 0; -        inode_t     *inode      = NULL;          xlator_t    *subvol = 0;          local = frame->local; @@ -402,7 +401,8 @@ dht_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          local->op_errno = op_errno;          if ((op_ret == -1) || IS_DHT_MIGRATION_PHASE2 (stbuf)) {                  /* File would be migrated to other node */ -                ret = dht_inode_ctx_get1 (this, inode, &subvol); +                ret = dht_inode_ctx_get_mig_info (this, local->fd->inode, NULL, +                                                  &subvol);                  if (!subvol) {                          local->rebalance.target_op_fn = dht_readv2;                          ret = dht_rebalance_complete_check (this, frame); @@ -617,7 +617,6 @@ dht_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                 int op_ret, int op_errno, dict_t *xdata)  {          dht_local_t  *local  = NULL; -        inode_t      *inode  = NULL;          xlator_t     *subvol = 0;          local = frame->local; @@ -628,7 +627,7 @@ dht_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                  goto out;          /* If context is set, then send flush() it to the destination */ -        dht_inode_ctx_get1 (this, inode, &subvol); +        dht_inode_ctx_get_mig_info (this, local->fd->inode, NULL, &subvol);          if (subvol) {                  dht_flush2 (this, subvol, frame);                  return 0; @@ -653,6 +652,7 @@ dht_flush2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame)          op_errno = local->op_errno; +        dht_inode_ctx_get_mig_info (this, local->fd->inode, NULL, &subvol);          if (subvol == NULL)                  goto out; @@ -740,7 +740,8 @@ dht_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,          }          local->op_errno = op_errno; -        dht_inode_ctx_get1 (this, inode, &subvol); +        inode = local->fd->inode; +        dht_inode_ctx_get_mig_info (this, inode, NULL, &subvol);          if (!subvol) {                  local->rebalance.target_op_fn = dht_fsync2;  | 
