diff options
authorRaghavendra Bhat <>2011-08-18 11:09:33 +0530
committerVijay Bellur <>2011-08-20 00:14:37 -0700
commitfd55b20709a0f4ec3bca989726eef3ed15e98000 (patch)
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: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 33e0a47..d0f0146 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;
- STACK_UNWIND_STRICT (unlink, frame, -1, ENOMEM, NULL, NULL);
+ STACK_UNWIND_STRICT (unlink, frame, -1, op_errno, NULL, NULL);
return 0;