summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2015-08-26 15:24:39 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-09-03 03:59:49 -0700
commitb1cd5cb8a857ed3a95eab95179378283c8d41763 (patch)
tree829df5d78be3ffe1d92da781aeccaf20da556b00 /xlators/mount
parent8e7ca068720fa6fa50e4746e5b17c305f38171e8 (diff)
mount/fuse: Log ENODATA as DEBUG in {f}removexattr
Logging ENODATA errors for {f}removexattr at a higher loglevel does not add a lot of value and causes a log message flood as per multiple reports. Added a new cbk, fuse_removexattr_cbk() to be used with removexattr fops. ENODATA now gets logged at loglevel DEBUG in fuse_removexattr_cbk(). This also prevents more conditional checks in the common fuse_err_cbk() callback. Change-Id: I1585b4d627e0095022016c47d7fd212018a7194b BUG: 1248941 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/12015 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/12041
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index b67a60a76b1..f78b7d23e89 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -1205,6 +1205,47 @@ fuse_setattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
}
static int
+fuse_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
+{
+ fuse_state_t *state = NULL;
+ fuse_in_header_t *finh = NULL;
+
+ GF_ASSERT (frame);
+ GF_ASSERT (frame->root);
+
+ state = frame->root->state;
+ finh = state->finh;
+
+ fuse_log_eh_fop(this, state, frame, op_ret, op_errno);
+
+ if (op_ret == 0) {
+ gf_log ("glusterfs-fuse", GF_LOG_TRACE,
+ "%"PRIu64": %s() %s => 0", frame->root->unique,
+ gf_fop_list[frame->root->op],
+ state->loc.path ? state->loc.path : "ERR");
+
+ send_fuse_err (this, finh, 0);
+ } else {
+ gf_log ("glusterfs-fuse",
+ (ENODATA == op_errno) ? GF_LOG_DEBUG : GF_LOG_WARNING,
+ "%"PRIu64": %s() of %s on %s => -1 (%s)",
+ frame->root->unique,
+ gf_fop_list[frame->root->op],
+ state->name ? state->name : "",
+ state->loc.path ? state->loc.path : "ERR",
+ strerror (op_errno));
+
+ send_fuse_err (this, finh, op_errno);
+ }
+
+ free_fuse_state (state);
+ STACK_DESTROY (frame->root);
+
+ return 0;
+}
+
+static int
fuse_err_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
@@ -3549,14 +3590,14 @@ fuse_removexattr_resume (fuse_state_t *state)
"%"PRIu64": REMOVEXATTR %p/%"PRIu64" (%s)", state->finh->unique,
state->fd, state->finh->nodeid, state->name);
- FUSE_FOP (state, fuse_err_cbk, GF_FOP_FREMOVEXATTR,
+ FUSE_FOP (state, fuse_removexattr_cbk, GF_FOP_FREMOVEXATTR,
fremovexattr, state->fd, state->name, state->xdata);
} else {
gf_log ("glusterfs-fuse", GF_LOG_TRACE,
"%"PRIu64": REMOVEXATTR %s/%"PRIu64" (%s)", state->finh->unique,
state->loc.path, state->finh->nodeid, state->name);
- FUSE_FOP (state, fuse_err_cbk, GF_FOP_REMOVEXATTR,
+ FUSE_FOP (state, fuse_removexattr_cbk, GF_FOP_REMOVEXATTR,
removexattr, &state->loc, state->name, state->xdata);
}
}