diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-31 07:45:20 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-31 10:49:45 -0700 |
commit | c9d43f40282af3b3b0c6675e587c573941192769 (patch) | |
tree | 87b7287b25aa1b1c97cdc2e7b4eac6f579d60375 /cli | |
parent | d1a277785af5d9d0e38d0576d2a9c69e27a232df (diff) |
fixes in 'gluster volume rebalance'
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1481 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1481
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli3_1-cops.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index 9b977cc3b..6971a242d 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -566,8 +566,20 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, if (rsp.op_ret == -1) cli_out ("failed to get the status of defrag process"); else { - cli_out ("rebalanced %"PRId64" files of size %"PRId64 - " (total files scanned %"PRId64")", + char *status = "unknown"; + if (rsp.op_errno == 0) + status = "not started"; + if (rsp.op_errno == 1) + status = "in progress"; + if (rsp.op_errno == 2) + status = "stopped"; + if (rsp.op_errno == 3) + status = "completed"; + if (rsp.op_errno == 4) + status = "failed"; + + cli_out ("rebalance %s: rebalanced %"PRId64" files of size %"PRId64 + " (total files scanned %"PRId64")", status, rsp.files, rsp.size, rsp.lookedup_files); } } |