summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.h
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-01-04 00:08:14 +0530
committerVijay Bellur <vijay@gluster.com>2012-01-27 04:23:41 -0800
commite99cb60af1e153efd616014da6a54d2f95c119d1 (patch)
treebf6e3e92ae6d200b72fd41e0ee7fed0ff720c431 /xlators/mgmt/glusterd/src/glusterd.h
parent5a8c58cf6e6c993c8665a31e6f108744ca27ccf4 (diff)
glusterd: provide option to take statedump of the nfs server
Currently the cli command for taking statedump is for glusterfs servers only. Statedump of nfs server cannot be taken. With this patch if one gives nfs as an option to the statedump command, then the nfs-server's statedump is taken. Change-Id: I4ef7a68e608da4aa2f17541d7b42cd78ce2624b6 BUG: 771587 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 7cd34a00..fe2402ec 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -284,6 +284,9 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
GLUSTERD_VOLUME_DIR_PREFIX, volinfo->volname, \
GLUSTERD_BRICK_INFO_DIR);
+#define GLUSTERD_GET_NFS_DIR(path, priv) \
+ snprintf (path, PATH_MAX, "%s/nfs", priv->workdir);
+
#define GLUSTERD_REMOVE_SLASH_FROM_PATH(path,string) do { \
int i = 0; \
for (i = 1; i < strlen (path); i++) { \
@@ -300,6 +303,11 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
volpath, hostname, exp_path); \
}
+#define GLUSTERD_GET_NFS_PIDFILE(pidfile,nfspath) { \
+ snprintf (pidfile, PATH_MAX, "%s/run/nfs.pid", \
+ nfspath); \
+ }
+
#define GLUSTERD_STACK_DESTROY(frame) do {\
frame->local = NULL; \
STACK_DESTROY (frame->root);\
@@ -565,7 +573,7 @@ int glusterd_op_stage_rebalance (dict_t *dict, char **op_errstr);
int glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict);
int glusterd_op_stage_statedump_volume (dict_t *dict, char **op_errstr);
-int glusterd_op_statedump_volume (dict_t *dict);
+int glusterd_op_statedump_volume (dict_t *dict, char **op_errstr);
/* misc */
void glusterd_do_replace_brick (void *data);