summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.h
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-11-25 00:04:39 +0530
committerKaushal M <kaushal@redhat.com>2015-12-10 06:14:53 -0800
commite0b2bcf34b57f75a244ef88341b0f3d5990c768b (patch)
tree6dbf6c2ead2c1795b4659c8334541c8492a565c4 /cli/src/cli.h
parentfe96043b80c647513c2d3a7d63ef9548f92ce11c (diff)
quota: show used_space,(file,dir) count even when quota limit is not set
Problem: As of now quota 'list/list-objects' will list the usage only if limit is set for every directory else it will fail with ENOATTR(If inode/inode-quota is already configured for the first time). Feature: With the patch we are enhancing this command to list the usage even if quota limit is not set but still the user has to configure inode/inode-quota for the first time. Example: Consider we have /client/dir and /client1(absolute path from mount point): Quota limit is set only on /client. when we try listing /client/dir or /client1, it shows "Limit not set". Fix: The patch fixes this by showing "used space" in case of list command and shows "file_count" & "dir_count" in case of list-objects command. This works fine with xml output as well. Backport of http://review.gluster.org/#/c/12741/ Cherry-picked from commit 608c646cc00e2c1c0b9c87e9fd7cb9e1eb271db2 > Change-Id: I68b08ec77a583b3c7f39fe4d6b15d3d77adb095a > BUG: 1284752 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Change-Id: I68b08ec77a583b3c7f39fe4d6b15d3d77adb095a BUG: 1289063 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12893 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r--cli/src/cli.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 59315797eef..1f5704fd25a 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -405,13 +405,14 @@ cli_quota_list_xml_error (cli_local_t *local, char *path,
int
cli_quota_xml_output (cli_local_t *local, char *path, int64_t hl_str,
char *sl_final, int64_t sl_num, int64_t used,
- int64_t avail, char *sl, char *hl);
+ int64_t avail, char *sl, char *hl,
+ gf_boolean_t limit_set);
int
cli_quota_object_xml_output (cli_local_t *local, char *path, char *sl_str,
int64_t sl_val, quota_limits_t *limits,
quota_meta_t *used_space, int64_t avail,
- char *sl, char *hl);
+ char *sl, char *hl, gf_boolean_t limit_set);
int
cli_xml_output_peer_status (dict_t *dict, int op_ret, int op_errno,