diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-07-17 18:29:43 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2013-08-12 00:48:14 +0530 |
commit | b0905d7866aa3511f202bf8e098c47caa99b2b10 (patch) | |
tree | 0d895b77b10ed2940c370e7ead6811cbdf357460 /cli | |
parent | a1d9063ce186a5bc42621a7afe5a69c97612fbca (diff) |
glusterd, cli: Provide status of quotad in 'volume status'
Change-Id: I5e90376ecfe11ae5a3bca936d9d9acdd54c337d7
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 13 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 2 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 6 |
3 files changed, 18 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 12feb75b..a50e4b3c 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -2355,6 +2355,8 @@ cli_cmd_volume_status_parse (const char **words, int wordcount, cmd |= GF_CLI_STATUS_NFS; } else if (!strcmp (words[3], "shd")) { cmd |= GF_CLI_STATUS_SHD; + } else if (!strcmp (words[3], "quotad")) { + cmd |= GF_CLI_STATUS_QUOTAD; } else { cmd = GF_CLI_STATUS_BRICK; ret = dict_set_str (dict, "brick", @@ -2408,6 +2410,17 @@ cli_cmd_volume_status_parse (const char **words, int wordcount, goto out; } cmd |= GF_CLI_STATUS_SHD; + } else if (!strcmp (words[3], "quotad")) { + if (cmd == GF_CLI_STATUS_FD || + cmd == GF_CLI_STATUS_CLIENTS || + cmd == GF_CLI_STATUS_DETAIL || + cmd == GF_CLI_STATUS_INODE) { + cli_err ("Detail/FD/Clients/Inode status not " + "available for Quota Daemon"); + ret = -1; + goto out; + } + cmd |= GF_CLI_STATUS_QUOTAD; } else { cmd |= GF_CLI_STATUS_BRICK; ret = dict_set_str (dict, "brick", (char *)words[3]); diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 101759ba..189d36c0 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1915,7 +1915,7 @@ struct cli_cmd volume_cmds[] = { cli_cmd_volume_top_cbk, "volume top operations"}, - { "volume status [all | <VOLNAME> [nfs|shd|<BRICK>]]" + { "volume status [all | <VOLNAME> [nfs|shd|<BRICK>|quotad]]" " [detail|clients|mem|inode|fd|callpool]", cli_cmd_volume_status_cbk, "display status of all or specified volume(s)/brick"}, diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 388805af..49949f54 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -6511,7 +6511,8 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov, goto out; } - if ((cmd & GF_CLI_STATUS_NFS) || (cmd & GF_CLI_STATUS_SHD)) + if ((cmd & GF_CLI_STATUS_NFS) || (cmd & GF_CLI_STATUS_SHD) || + (cmd & GF_CLI_STATUS_QUOTAD)) notbrick = _gf_true; ret = dict_get_int32 (dict, "count", &count); @@ -6618,7 +6619,8 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov, */ memset (status.brick, 0, PATH_MAX + 255); if (!strcmp (hostname, "NFS Server") || - !strcmp (hostname, "Self-heal Daemon")) + !strcmp (hostname, "Self-heal Daemon") || + !strcmp (hostname, "Quota Daemon")) snprintf (status.brick, PATH_MAX + 255, "%s on %s", hostname, path); else |