From fd55b20709a0f4ec3bca989726eef3ed15e98000 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 18 Aug 2011 11:09:33 +0530 Subject: 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 Reviewed-by: Vijay Bellur --- xlators/features/marker/src/marker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit