diff options
author | Kaushal M <kaushal@gluster.com> | 2011-09-06 17:18:20 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-19 22:00:25 -0700 |
commit | 8d4d8088c73f2ffc60b8e5c23a33e6b996fb5053 (patch) | |
tree | df5e6dc68206c72ad1cb3f8b664f50028d725a8b /glusterfsd/src/glusterfsd.h | |
parent | e0178776546f06646c11bcb1ea345f82436d73aa (diff) |
glusterd: run 'volume top read-perf/write-perf' in different thread
Runs the 'volume top read-perf/write-perf' operations in a different
thread without blocking glusterd. Prvents glusterd from being
unresponsive when large values of 'bs' and 'count' are given.
Also increase cli timeout for top/profile commands , from 120s to 300s
to allow large i/o top read-perf and write-perf to return result.
Change-Id: I4b7de1d735f33643d836772db7f25133f112b75a
BUG: 2720
Reviewed-on: http://review.gluster.com/375
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'glusterfsd/src/glusterfsd.h')
-rw-r--r-- | glusterfsd/src/glusterfsd.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index 5106559c14c..0e68f7f0ea8 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -24,7 +24,8 @@ #define _CONFIG_H #include "config.h" #endif - +#include "rpcsvc.h" +#include "glusterd1-xdr.h" #define DEFAULT_GLUSTERD_VOLFILE CONFDIR "/glusterd.vol" #define DEFAULT_CLIENT_VOLFILE CONFDIR "/glusterfs.vol" @@ -81,9 +82,22 @@ enum argp_option_keys { ARGP_USER_MAP_ROOT_KEY = 156, }; +struct _gfd_vol_top_priv_t { + rpcsvc_request_t *req; + gd1_mgmt_brick_op_req xlator_req; + int32_t blk_count; + int32_t blk_size; + double throughput; + double time; + int32_t ret; +}; +typedef struct _gfd_vol_top_priv_t gfd_vol_top_priv_t; + int glusterfs_mgmt_pmap_signout (glusterfs_ctx_t *ctx); int glusterfs_mgmt_pmap_signin (glusterfs_ctx_t *ctx); int glusterfs_volfile_fetch (glusterfs_ctx_t *ctx); void cleanup_and_exit (int signum); +void *glusterfs_volume_top_read_perf (void *args); +void *glusterfs_volume_top_write_perf (void *args); #endif /* __GLUSTERFSD_H__ */ |