summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-08-18 11:09:33 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-20 00:14:37 -0700
commitfd55b20709a0f4ec3bca989726eef3ed15e98000 (patch)
treeab8d01d04fd57fa1f227e8b52adacd546f3b6ec7 /xlators
parentc4166b86203562b6383ddfa160bb7d925af8b72c (diff)
features/marker: send the errno sent by posix to the upper xlators, instead of ENOMEM
Marker sends stat first, before sending the unlink. By the time stat reaches posix if the file is deleted by another client, then stat fails with op_errno set to ENOENT. But in the corresponding call back function of marker (i.e marker_unlink_stat_cbk), we check for (op_ret < 0) and if so we unwind by sending ENOMEM as the error to the above xlators which results in the applications (such as rm -rf) also getting ENOMEM. Change-Id: Idb63215a6c46f3acfe4c0fa7cb2dd97b0170441b BUG: 3429 Reviewed-on: http://review.gluster.com/253 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/src/marker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 33e0a477d1e..d0f01465ffa 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -772,6 +772,7 @@ marker_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
if (local == NULL) {
+ op_errno = EINVAL;
goto err;
}
@@ -781,7 +782,7 @@ marker_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
FIRST_CHILD(this)->fops->unlink, &local->loc);
return 0;
err:
- STACK_UNWIND_STRICT (unlink, frame, -1, ENOMEM, NULL, NULL);
+ STACK_UNWIND_STRICT (unlink, frame, -1, op_errno, NULL, NULL);
return 0;
}