Details
Description
Sometime I need to work with customer on quota issue.
And all time I need to think twice on the way the command display things.
For example on a simple test :
root@es522vm0:/lustre/testfs/client/test/ lfs setquota -u user1000 -b 100m -B 200M -i 10000 -I 20000 /lustre/testfs/client/
root@es522vm0:/lustre/testfs/client/test/ lfs quota -h -u user1000 /lustre/testfs/client/
Disk quotas for usr user1000 (uid 1000):
Filesystem used quota limit grace files quota limit grace
/lustre/testfs/client/
16k 100M 200M - 2 10000 20000 -
Here, if you are not familiar with quota ( and I'm not ).
Having some hint from the banner which say "block" are on the left, inode are on the right, grace is in "time" could help lots and lots of people like me.
The following function display the title : lustre/utils/lfs.c
static void print_quota_title(char *name, struct if_quotactl *qctl, bool human_readable, bool show_default) { if (show_default) { printf("Disk default %s quota:\n", qtype_name(qctl->qc_type)); printf("%15s %8s%8s%8s %8s%8s%8s\n", "Filesystem", "bquota", "blimit", "bgrace", "iquota", "ilimit", "igrace"); } else { printf("Disk quotas for %s %s (%cid %u):\n", qtype_name(qctl->qc_type), name, *qtype_name(qctl->qc_type), qctl->qc_id); printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n", "Filesystem", human_readable ? "used" : "kbytes", "quota", "limit", "grace", "files", "quota", "limit", "grace"); } }
Is it possible in the future to standardized the display like it is done with "Default User", "Default Group", "Default Project". Because here, we know we are talking about inode or block.
To be honnest, it's hard to read if you don't do that daily.
At the same time, it could allow to fix the allignment of the "printf" between "defaultUser/Group/Project" and the standard output.