diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 501bd31e3f5..7a3c3ddd90f 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3410,8 +3410,9 @@ dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                          local->op_errno = op_errno;                          local->op_ret   = -1; -                        if (op_errno != ENOENT) +                        if (op_errno != ENOENT && op_errno != EACCES) {                                  local->need_selfheal = 1; +                        }                          gf_log (this->name, GF_LOG_DEBUG,                                  "rmdir on %s for %s failed (%s)", @@ -3420,6 +3421,8 @@ dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                          goto unlock;                  } +                /* Track if rmdir succeeded on atleast one subvol*/ +                local->fop_succeeded = 1;                  dht_iatt_merge (this, &local->preparent, preparent, prev->this);                  dht_iatt_merge (this, &local->postparent, postparent,                                  prev->this); @@ -3430,7 +3433,7 @@ unlock:          this_call_cnt = dht_frame_return (frame);          if (is_last_call (this_call_cnt)) { -                if (local->need_selfheal) { +                if (local->need_selfheal && local->fop_succeeded) {                          local->layout =                                  dht_layout_get (this, local->loc.inode); @@ -3766,6 +3769,7 @@ dht_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)          local->call_cnt = conf->subvolume_cnt;          local->op_ret   = 0; +        local->fop_succeeded = 0;          local->flags = flags;  | 
