On 5/12/22 6:12 PM, Darrick J. Wong wrote: > On Thu, May 12, 2022 at 05:34:37PM -0500, Eric Sandeen wrote: >> On 5/5/22 11:08 AM, Darrick J. Wong wrote: >>> From: Darrick J. Wong <djwong@xxxxxxxxxx> >>> >>> If there's nothing to repair in phase 4, there's no need to hold up the >>> FITRIM call to do the summary count scan that prepares us to repair >>> filesystem metadata. Rearrange this a bit. >>> >>> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> >> >> >>> + >>> + /* >>> + * If errors remain on the filesystem, do not trim anything. We don't >>> + * have any threads running, so it's ok to skip the ctx lock here. >>> + */ >>> + if (ctx->corruptions_found || ctx->unfixable_errors == 0) >>> + return 0; >>> + >>> +maybe_trim: >>> + trim_filesystem(ctx); >>> + return 0; >>> } >> >> I'm a little confused by the unfixable_errors test, is that correct? >> >> Why do you bail out if there are 0 unfixable errors? > > Oooops. That was a logic inversion bug. :( I'll fix it up and commit it with: + if (ctx->corruptions_found || ctx->unfixable_errors != 0) + return 0; if you want to confirm that's correct? -Eric