summaryrefslogtreecommitdiffstats
path: root/xlators/features/changetimerecorder
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-11-02 15:39:46 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-11-09 03:12:26 -0800
commit2794cb71b96c44033dcd01102039c038956cf7b5 (patch)
tree0dc5459474f4e07ba0e75a81b79b0ae99db850bb /xlators/features/changetimerecorder
parentc8c9308134ae4ce24c630a1b0ccfcf4e8f9b0fe7 (diff)
marker: do remove xattr only for last link
With unlink, rename, rmdir, contribution xattrs are removed. If the file is a last link then remove_xattr will fail with ENOENT. So it better to perform remove_xattr only if there are more links to the file Change-Id: Ifc1e7fda4d310fd87f6f28a635c9ea78b8f3929d BUG: 1257694 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12033 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/changetimerecorder')
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 400549d6ead..2dd99dbb5cd 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -814,15 +814,15 @@ ctr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/*
*
- * Extracting CTR_RESPONSE_LINK_COUNT_XDATA from POSIX Xlator
+ * Extracting GF_RESPONSE_LINK_COUNT_XDATA from POSIX Xlator
*
* */
- ret = dict_get_uint32 (xdata , CTR_RESPONSE_LINK_COUNT_XDATA,
+ ret = dict_get_uint32 (xdata , GF_RESPONSE_LINK_COUNT_XDATA,
&remaining_links);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
CTR_MSG_GET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED,
- "Failed to getting CTR_RESPONSE_LINK_COUNT_XDATA");
+ "Failed to getting GF_RESPONSE_LINK_COUNT_XDATA");
remaining_links = -1;
}
@@ -851,7 +851,7 @@ ctr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
STACK_UNWIND_STRICT (unlink, frame, op_ret, op_errno, preparent,
- postparent, NULL);
+ postparent, xdata);
return 0;
}
@@ -908,7 +908,7 @@ ctr_unlink (call_frame_t *frame, xlator_t *this,
/*
*
- * Sending CTR_REQUEST_LINK_COUNT_XDATA
+ * Sending GF_REQUEST_LINK_COUNT_XDATA
* to POSIX Xlator to send link count in unwind path
*
* */
@@ -920,15 +920,15 @@ ctr_unlink (call_frame_t *frame, xlator_t *this,
if (!xdata) {
gf_msg (this->name, GF_LOG_ERROR, 0,
CTR_MSG_XDATA_NULL, "xdata is NULL :Cannot send "
- "CTR_REQUEST_LINK_COUNT_XDATA to posix");
+ "GF_REQUEST_LINK_COUNT_XDATA to posix");
goto out;
}
- ret = dict_set_int32 (xdata, CTR_REQUEST_LINK_COUNT_XDATA, 1);
+ ret = dict_set_int32 (xdata, GF_REQUEST_LINK_COUNT_XDATA, 1);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
CTR_MSG_SET_CTR_RESPONSE_LINK_COUNT_XDATA_FAILED,
- "Failed setting CTR_REQUEST_LINK_COUNT_XDATA");
+ "Failed setting GF_REQUEST_LINK_COUNT_XDATA");
if (is_xdata_created) {
dict_unref (xdata);
}