@@ -16,6 +16,16 @@
*/
static uint16_t chkd_flags;
+/*
+ * Return CHKD flags for the quota types that we checked. If we encountered
+ * any errors at all, return zero.
+ */
+uint16_t
+quotacheck_results(void)
+{
+ return chkd_flags;
+}
+
/* Global incore dquot tree */
struct qc_dquots {
pthread_mutex_t lock;
@@ -8,6 +8,7 @@
void quotacheck_adjust(struct xfs_mount *mp, xfs_ino_t ino);
void quotacheck_verify(struct xfs_mount *mp, unsigned int type);
+uint16_t quotacheck_results(void);
int quotacheck_setup(struct xfs_mount *mp);
void quotacheck_teardown(void);
@@ -25,6 +25,7 @@
#include "libfrog/fsgeom.h"
#include "libfrog/platform.h"
#include "bload.h"
+#include "quotacheck.h"
/*
* option tables for getsubopt calls
@@ -1100,7 +1101,8 @@ _("Warning: project quota information would be cleared.\n"
dsb = sbp->b_addr;
- if (be16_to_cpu(dsb->sb_qflags) & XFS_ALL_QUOTA_CHKD) {
+ if ((be16_to_cpu(dsb->sb_qflags) & XFS_ALL_QUOTA_CHKD) !=
+ quotacheck_results()) {
do_warn(_("Note - quota info will be regenerated on next "
"quota mount.\n"));
dsb->sb_qflags &= cpu_to_be16(~XFS_ALL_QUOTA_CHKD);