From c4ebd25a176d6d51d702b1009e261c3c27237a48 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 1 Jun 2010 17:27:18 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 972 (Metabug for misc. fuse features) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=972 --- glusterfsd/src/glusterfsd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'glusterfsd/src/glusterfsd.c') 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; -- cgit