dq = get_dq(quota_dict, dquot->dq_id);
dq->dq_id = dquot->dq_id;
+ dq->dq_flags |= DQF_SEEN;
print_dquot("mem", dq);
print_dquot("dsk", dquot);
ext2_filsys fs = qctx->fs;
struct quota_handle qh;
struct scan_dquots_data scan_data;
+ struct dquot *dq;
+ dnode_t *n;
+ dict_t *dict = qctx->quota_dict[qtype];
ext2_ino_t qf_ino;
errcode_t err = 0;
- if (!qctx->quota_dict[qtype])
+ if (!dict)
goto out;
qf_ino = qtype == USRQUOTA ? fs->super->s_usr_quota_inum :
log_err("Error scanning dquots");
goto out;
}
+
+ for (n = dict_first(dict); n; n = dict_next(dict, n)) {
+ dq = dnode_get(n);
+ if (!dq)
+ continue;
+ if ((dq->dq_flags & DQF_SEEN) == 0) {
+ fprintf(stderr, "[QUOTA WARNING] "
+ "Missing quota entry ID %d\n", dq->dq_id);
+ scan_data.usage_is_inconsistent = 1;
+ }
+ }
*usage_inconsistent = scan_data.usage_is_inconsistent;
out:
struct util_dqblk dq_dqb; /* Parsed data of dquot */
};
+#define DQF_SEEN 0x0001
+
/* Structure of quotafile operations */
struct quotafile_ops {
/* Check whether quotafile is in our format */