tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
block/kbyte confusion in edquota (was: Error (typo) in quotacheck(8))
I've run into another (mostly documentation) issue with edquota.
Having read the man page, I was under the impression that the block limits
and usage were given in, ehm, blocks, i.e., either 512 byte or BLOCKSIZE units.
If you interactively edit quotas, the text presented in the editor even reads
"blocks in use".
However, as the source code clearly exhibits, what you actually get (and enter)
is kilobytes:
fprintf(fd, "%s: %s %d, limits (soft = %d, hard = %d)\n",
qup->fsname, "blocks in use:",
(int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks) / 1024),
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit) / 1024),
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit) / 1024));
Could this (and the sscanf() below, of course) be rephrased to "kilobytes in
use" without breaking anything?
At least, I think the man page should clearly state that size limits are in
kilobytes, not disk blocks.
As an effect of my mis-understanding, currently, my users are granted twice as
much disk space as they should have been.
Along the same lines, repquota's title lines read "Block Limits". Would it be
appropriate to change that to "Size limits", "Kilobyte limits" or "Block Limits
(Kilobytes)"?.
Otoh, repquota's man page correctly states that output is in kilobytes.
Home |
Main Index |
Thread Index |
Old Index