@@ -904,19 +904,26 @@ static void ovl_scan_report(struct scan_ctx *sctx)
/* Report the invalid targets left */
static void ovl_scan_check(struct scan_ctx *sctx)
{
- if (sctx->i_whiteouts)
+ bool incons = false;
+
+ if (sctx->i_whiteouts) {
print_info(_("Invalid whiteouts %d left!\n"),
sctx->i_whiteouts);
- else if (sctx->i_redirects)
+ incons = true;
+ }
+ if (sctx->i_redirects) {
print_info(_("Invalid redirect directories %d left!\n"),
sctx->i_redirects);
- else if (sctx->m_impure)
+ incons = true;
+ }
+ if (sctx->m_impure) {
print_info(_("Directories %d missing impure xattr!\n"),
sctx->m_impure);
- else
- return;
+ incons = true;
+ }
- set_inconsistency(&status);
+ if (incons)
+ set_inconsistency(&status);
}
/* Scan upperdir and each lowerdirs, check and fix inconsistency */
Now, the ovl_scan_check will not show all the infomation about the invalid xattr. Signed-off-by: yangerkun <yangerkun@huawei.com> --- check.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)