From b542a8e5323fad46ce4e5f8921c906a58cff91d2 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 15 Sep 2009 04:44:41 +0000 Subject: mount/fuse: Support for dumpop priv. Signed-off-by: Anand V. Avati BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213 --- xlators/mount/fuse/src/fuse-bridge.c | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 861f303dd29..85b7d15f6c4 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -42,6 +42,7 @@ #include "xlator.h" #include "defaults.h" #include "common-utils.h" +#include "statedump.h" #include "fuse_kernel.h" #include "fuse-misc.h" @@ -2926,6 +2927,48 @@ fuse_thread_proc (void *data) return NULL; } +int32_t +fuse_priv_dump (xlator_t *this) +{ + fuse_private_t *private = NULL; + + if (!this) + return -1; + + private = this->private; + + if (!private) + return -1; + + gf_proc_dump_add_section("xlator.mount.fuse.priv"); + + gf_proc_dump_write("xlator.mount.fuse.priv.fd", "%d", private->fd); + gf_proc_dump_write("xlator.mount.fuse.priv.proto_minor", "%u", + private->proto_minor); + gf_proc_dump_write("xlator.mount.fuse.priv.volfile", "%s", + private->volfile?private->volfile:"None"); + gf_proc_dump_write("xlator.mount.fuse.volfile_size", "%d", + private->volfile_size); + gf_proc_dump_write("xlator.mount.fuse.mount_point", "%s", + private->mount_point); + gf_proc_dump_write("xlator.mount.fuse.iobuf", "%u", + private->iobuf); + gf_proc_dump_write("xlator.mount.fuse.fuse_thread_started", "%d", + (int)private->fuse_thread_started); + gf_proc_dump_write("xlator.mount.fuse.direct_io_mode", "%d", + private->direct_io_mode); + gf_proc_dump_write("xlator.mount.fuse.entry_timeout", "%lf", + private->entry_timeout); + gf_proc_dump_write("xlator.mount.fuse.entry_timeout", "%lf", + private->attribute_timeout); + gf_proc_dump_write("xlator.mount.fuse.first_call", "%d", + (int)private->first_call); + gf_proc_dump_write("xlator.mount.fuse.strict_volfile_check", "%d", + (int)private->strict_volfile_check); + + return 0; +} + int32_t notify (xlator_t *this, int32_t event, void *data, ...) @@ -3199,6 +3242,10 @@ struct xlator_cbks cbks = { struct xlator_mops mops = { }; +struct xlator_dumpops dumpops = { + .priv = fuse_priv_dump, +}; + struct volume_options options[] = { { .key = {"direct-io-mode"}, .type = GF_OPTION_TYPE_BOOL -- cgit