diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2012-01-04 00:08:14 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-01-27 04:23:41 -0800 |
commit | e99cb60af1e153efd616014da6a54d2f95c119d1 (patch) | |
tree | bf6e3e92ae6d200b72fd41e0ee7fed0ff720c431 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c | |
parent | 5a8c58cf6e6c993c8665a31e6f108744ca27ccf4 (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-volume-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index e3971a2763c..1389f78f9d4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -1383,7 +1383,7 @@ glusterd_op_heal_volume (dict_t *dict, char **op_errstr) } int -glusterd_op_statedump_volume (dict_t *dict) +glusterd_op_statedump_volume (dict_t *dict, char **op_errstr) { int ret = 0; char *volname = NULL; @@ -1401,11 +1401,19 @@ glusterd_op_statedump_volume (dict_t *dict) if (ret) goto out; gf_log ("", GF_LOG_DEBUG, "Performing statedump on volume %s", volname); - list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) { - ret = glusterd_brick_statedump (volinfo, brickinfo, options, - option_cnt); + if (strstr (options, "nfs") != NULL) { + ret = glusterd_nfs_statedump (options, option_cnt, op_errstr); if (ret) goto out; + } else { + list_for_each_entry (brickinfo, &volinfo->bricks, + brick_list) { + ret = glusterd_brick_statedump (volinfo, brickinfo, + options, option_cnt, + op_errstr); + if (ret) + goto out; + } } out: |