diff options
| author | Kevin Vigor <kvigor@fb.com> | 2017-03-16 10:35:25 -0700 |
|---|---|---|
| committer | Kevin Vigor <kvigor@fb.com> | 2017-03-16 10:35:25 -0700 |
| commit | ae361e8339cc51966ebd222d7fb9046e936d56f5 (patch) | |
| tree | 9c893ed88dc4086238e90e59c6ab37aee6cd308a /xlators/cluster/dht/src | |
| parent | 35cfc2853a617a8ee8ed499b6c989b5bed41b2b7 (diff) | |
| parent | 68d5c0ef243a9f27939128d1d12d519167ad988a (diff) | |
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8
Change-Id: Ib336c2ada491c2d2fcbbbe6865f9eb975a405b36
Diffstat (limited to 'xlators/cluster/dht/src')
| -rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index a97d03bb055..81f7a8a40e6 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3929,6 +3929,7 @@ dht_setxattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, int ret) goto err; local = frame->local; + op_errno = local->op_errno; if (we_are_not_migrating (ret)) { /* This dht xlator is not migrating the file. Unwind and @@ -3943,7 +3944,6 @@ dht_setxattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, int ret) if (subvol == NULL) goto err; - op_errno = local->op_errno; local->call_cnt = 2; /* This is the second attempt */ @@ -3968,6 +3968,15 @@ err: } int +dht_nuke_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct iatt *preparent, + struct iatt *postparent, dict_t *xdata) +{ + STACK_UNWIND_STRICT (setxattr, frame, op_ret, op_errno, NULL); + return 0; +} + +int dht_nuke_dir (call_frame_t *frame, xlator_t *this, loc_t *loc, data_t *tmp) { if (!IA_ISDIR(loc->inode->ia_type)) { @@ -3998,7 +4007,7 @@ dht_nuke_dir (call_frame_t *frame, xlator_t *this, loc_t *loc, data_t *tmp) * obscure the fact that we came in via this path instead of a genuine * rmdir. That makes debugging just a tiny bit easier. */ - STACK_WIND (frame, default_rmdir_cbk, this, this->fops->rmdir, + STACK_WIND (frame, dht_nuke_dir_cbk, this, this->fops->rmdir, loc, 1, NULL); return 0; @@ -4351,10 +4360,11 @@ dht_removexattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, dht_local_t *local = NULL; int op_errno = EINVAL; - if (!frame || !frame->local || !subvol) + if (!frame || !frame->local) goto err; local = frame->local; + op_errno = local->op_errno; local->call_cnt = 2; /* This is the second attempt */ @@ -4369,6 +4379,9 @@ dht_removexattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, return 0; } + if (subvol == NULL) + goto err; + if (local->fop == GF_FOP_REMOVEXATTR) { STACK_WIND (frame, dht_file_removexattr_cbk, subvol, subvol->fops->removexattr, &local->loc, |
