summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-06-01 17:27:18 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-07 10:34:56 -0700
commitc4ebd25a176d6d51d702b1009e261c3c27237a48 (patch)
tree119df05127afee492115694f5cce86d132660bc8 /glusterfsd/src/glusterfsd.c
parentd23ae73d0e34010b464454ce81f53f44901ca544 (diff)
fuse: add a built-in fuse traffic dumper mechanism
It makes fuse dumping possible on platforms where strace is not available (eg. OS X), moreover it makes reporting of fuse related bugs more convenient. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 972 (Metabug for misc. fuse features) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=972
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r--glusterfsd/src/glusterfsd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index fa4e1a005..cf486d84f 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -163,6 +163,8 @@ static struct argp_option gf_options[] = {
{"attribute-timeout", ARGP_ATTRIBUTE_TIMEOUT_KEY, "SECONDS", 0,
"Set attribute timeout to SECONDS for inodes in fuse kernel module "
"[default: 1]"},
+ {"dump-fuse", ARGP_DUMP_FUSE_KEY, "PATH", 0,
+ "Dump fuse traffic to PATH"},
{"volfile-check", ARGP_VOLFILE_CHECK_KEY, 0, 0,
"Enable strict volume file checking"},
{0, 0, 0, 0, "Miscellaneous Options:"},
@@ -338,6 +340,10 @@ _add_fuse_mount (xlator_t *graph)
ret = dict_set_int32 (top->options, ZR_STRICT_VOLFILE_CHECK,
cmd_args->volfile_check);
+ if (cmd_args->dump_fuse)
+ ret = dict_set_static_ptr (top->options, ZR_DUMP_FUSE,
+ cmd_args->dump_fuse);
+
#ifdef GF_DARWIN_HOST_OS
/* On Darwin machines, O_APPEND is not handled,
* which may corrupt the data
@@ -1001,6 +1007,10 @@ parse_opts (int key, char *arg, struct argp_state *state)
cmd_args->mount_point = gf_strdup (arg);
break;
+
+ case ARGP_DUMP_FUSE_KEY:
+ cmd_args->dump_fuse = gf_strdup (arg);
+ break;
}
return 0;