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:55 -0800
commit9380b1d1fb74cd73d306a1a501e4b7b982c1a76e (patch)
treeb2f0dbc733a166ff9e7ec548bfa59aff9321305d /xlators/features/changetimerecorder
parent87c877c93c399863b6afcc642d015627217b79f8 (diff)
marker: do remove xattr only for last link
This is a backport of http://review.gluster.org/#/c/12033/ 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> Change-Id: Icf5fdd86bbb8eef0adeb9518e89e5b612e9e0705 BUG: 1279331 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12549 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.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 c4634c1..9602fd7 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);
}