summaryrefslogtreecommitdiffstats
path: root/glusterfs-guts/src/glusterfs-guts.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-02-18 17:36:07 +0530
committerVikas Gorur <vikas@zresearch.com>2009-02-18 17:36:07 +0530
commit77adf4cd648dce41f89469dd185deec6b6b53a0b (patch)
tree02e155a5753b398ee572b45793f889b538efab6b /glusterfs-guts/src/glusterfs-guts.h
parentf3b2e6580e5663292ee113c741343c8a43ee133f (diff)
Added all files
Diffstat (limited to 'glusterfs-guts/src/glusterfs-guts.h')
-rw-r--r--glusterfs-guts/src/glusterfs-guts.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/glusterfs-guts/src/glusterfs-guts.h b/glusterfs-guts/src/glusterfs-guts.h
new file mode 100644
index 00000000000..eda1788a9de
--- /dev/null
+++ b/glusterfs-guts/src/glusterfs-guts.h
@@ -0,0 +1,62 @@
+/*
+ Copyright (c) 2008 Z RESEARCH, Inc. <http://www.zresearch.com>
+ This file is part of GlusterFS.
+
+ GlusterFS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ GlusterFS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __GLUSTERFS_GUTS_H
+#define __GLUSTERFS_GUTS_H
+
+#include "xlator.h"
+#include "transport.h"
+#include "glusterfs.h"
+#include "glusterfs-fuse.h"
+#include "timer.h"
+
+#ifdef DEFAULT_LOG_FILE
+#undef DEFAULT_LOG_FILE
+#endif
+
+#define DEFAULT_LOG_FILE DATADIR"/log/glusterfs/glusterfs-guts.log"
+
+
+typedef struct {
+ int32_t threads; /* number of threads to start in replay mode */
+ char *logfile; /* logfile path */
+ int32_t loglevel; /* logging level */
+ char *directory; /* path to directory containing tio files, when threads > 1 */
+ char *file; /* path to tio file, when threads == 1 during replay. in trace mode, path to tio output */
+ char *specfile; /* path to specfile to load translator tree */
+ xlator_t *graph; /* translator tree after the specfile is loaded */
+ int32_t trace; /* if trace == 1, glusterfs-guts runs in trace mode, otherwise in replay mode */
+ char *mountpoint; /* valid only when trace == 1, mounpoint to mount glusterfs */
+} guts_ctx_t;
+
+
+typedef struct {
+ struct list_head threads;
+ pthread_t pthread;
+ xlator_t *tree;
+ char *file;
+ guts_ctx_t *ctx;
+} guts_thread_ctx_t;
+
+typedef struct {
+ struct list_head threads;
+} guts_threads_t;
+
+int32_t guts_replay (guts_thread_ctx_t *);
+int32_t guts_trace (guts_ctx_t *);
+#endif