#include "debugfs.h"
-const char *quota_type[] = { "user", "group", NULL };
+const char *quota_type[] = { "user", "group", "project", NULL };
static int load_quota_ctx(char *progname)
{
static int list_quota_callback(struct dquot *dq,
void *cb_data EXT2FS_ATTR((unused)))
{
- printf("%8u %8lld %8lld %8lld %8lld %8lld %8lld\n",
+ printf("%10u %8lld %8lld %8lld %8lld %8lld %8lld\n",
dq->dq_id, (long long)dq->dq_dqb.dqb_curspace,
(long long)dq->dq_dqb.dqb_bsoftlimit,
(long long)dq->dq_dqb.dqb_bhardlimit,
if (type < 0)
return;
- printf("%8s %8s %8s %8s %8s %8s %8s\n",
- (type == 0) ? "user id" : "group id",
+ printf("%7s %2s %8s %8s %8s %8s %8s %8s\n",
+ quota_type[type], "id",
"blocks", "quota", "limit", "inodes", "quota", "limit");
qh = current_qctx->quota_file[type];
retval = qh->qh_ops->scan_dquots(qh, list_quota_callback, NULL);
if (err)
return;
- printf("%8s %8s %8s %8s %8s %8s %8s\n",
- (type == 0) ? "user id" : "group id",
+ printf("%7s %2s %8s %8s %8s %8s %8s %8s\n",
+ quota_type[type], "id",
"blocks", "quota", "limit", "inodes", "quota", "limit");
qh = current_qctx->quota_file[type];
debugfs: list_quota user
- user id blocks quota limit inodes quota limit
- 0 13312 0 0 2 0 0
- 34 1024 0 0 1 0 0
- 100 2048 32 50 2 20 30
+ user id blocks quota limit inodes quota limit
+ 0 13312 0 0 2 0 0
+ 34 1024 0 0 1 0 0
+ 100 2048 32 50 2 20 30
debugfs: list_quota group
-group id blocks quota limit inodes quota limit
- 0 16384 0 0 5 0 0
+ group id blocks quota limit inodes quota limit
+ 0 16384 0 0 5 0 0
debugfs: get_quota user 0
- user id blocks quota limit inodes quota limit
- 0 13312 0 0 2 0 0
+ user id blocks quota limit inodes quota limit
+ 0 13312 0 0 2 0 0
debugfs: get_quota user 100
- user id blocks quota limit inodes quota limit
- 100 2048 32 50 2 20 30
+ user id blocks quota limit inodes quota limit
+ 100 2048 32 50 2 20 30
debugfs: get_quota user 34
- user id blocks quota limit inodes quota limit
- 34 1024 0 0 1 0 0
+ user id blocks quota limit inodes quota limit
+ 34 1024 0 0 1 0 0
debugfs: get_quota group 0
-group id blocks quota limit inodes quota limit
- 0 16384 0 0 5 0 0
+ group id blocks quota limit inodes quota limit
+ 0 16384 0 0 5 0 0
debugfs: