summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-12 01:54:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-12 00:45:48 -0700
commit78615ceea81479b38af43697766bcc04421a256d (patch)
treef5c95b96121abcd4fa0a8f6ce2f6c5e9d2df8366 /xlators/mount/fuse/src/fuse-bridge.c
parent553aa029de1817ae182cc86c1d00f8eb8ff52b50 (diff)
logging enhancements
* per translator loglevel introduced, if set, it will override process wide log level. * with extended attribute 'trusted.glusterfs.<xlator-name>.set-log-level' with the value being '<LOGLEVEL>', one can change log level of particular translator. * with extended attribute 'trusted.glusterfs.syslog' with the value '<BOOLEAN>', one can enable disable syslog for gluster Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 601 (Enable changing 'log-level' of GlusterFS process at runtime) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=601
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index ea5b5ae38ad..ac8295b96de 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -2290,6 +2290,15 @@ fuse_setxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
}
#endif
+ /* Check if the command is for changing the log
+ level of process or specific xlator */
+ ret = is_gf_log_command (this, name, value);
+ if (ret >= 0) {
+ send_fuse_err (this, finh, ret);
+ GF_FREE (finh);
+ return;
+ }
+
GET_STATE (this, finh, state);
state->size = fsi->size;
ret = fuse_loc_fill (&state->loc, state, finh->nodeid, 0, NULL);
@@ -2311,6 +2320,7 @@ fuse_setxattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
"%"PRIu64": SETXATTR dict allocation failed",
finh->unique);
+ send_fuse_err (this, finh, ENOMEM);
free_fuse_state (state);
return;
}
@@ -2749,7 +2759,6 @@ fuse_setlk (xlator_t *this, fuse_in_header_t *finh, void *msg)
return;
}
-
static void
fuse_init (xlator_t *this, fuse_in_header_t *finh, void *msg)
{
@@ -3001,6 +3010,9 @@ fuse_thread_proc (void *data)
priv->msg0_len_p = &iov_in[0].iov_len;
for (;;) {
+ /* THIS has to be reset here */
+ THIS = this;
+
if (priv->init_recvd)
fuse_graph_sync (this);