summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAnush Shetty <anush@gluster.com>2010-05-11 03:06:31 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-11 10:10:11 -0700
commit5ff01302f737ab731d42c9d7b6d9137e29a90d46 (patch)
tree7756fc01f2137746a59c869d76d3d26e70b7af72 /xlators
parent03edd34d0854accfa5170548dfdb152ac13feba5 (diff)
Adding GF_LOG_OCCASIONALLY to prevent repeated log messages
Signed-off-by: Anush Shetty <anush@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 10 ([ glusterfs 2.0.0 ] - Repeated Log messages with invalid remote-host in protocol/client) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=10
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index d699f795315..af310271a6c 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -67,6 +67,8 @@
#define MAX_FUSE_PROC_DELAY 1
+static int gf_fuse_conn_err_log;
+
typedef struct fuse_in_header fuse_in_header_t;
typedef void (fuse_handler_t) (xlator_t *this, fuse_in_header_t *finh,
void *msg);
@@ -715,11 +717,12 @@ fuse_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
send_fuse_data (this, finh, &fao,
FUSE_COMPAT_ATTR_OUT_SIZE);
} else {
- gf_log ("glusterfs-fuse", GF_LOG_WARNING,
- "%"PRIu64": %s() %s => -1 (%s)", frame->root->unique,
- gf_fop_list[frame->root->op],
- state->loc.path ? state->loc.path : "ERR",
- strerror (op_errno));
+ GF_LOG_OCCASIONALLY (gf_fuse_conn_err_log,
+ "glusterfs-fuse", GF_LOG_WARNING,
+ "%"PRIu64": %s() %s => -1 (%s)", frame->root->unique,
+ gf_fop_list[frame->root->op],
+ state->loc.path ? state->loc.path : "ERR",
+ strerror (op_errno));
send_fuse_err (this, finh, op_errno);
}