summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_fs.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-08-10 07:48:10 -0700
committerDarrick J. Wong <djwong@kernel.org>2023-08-10 07:48:10 -0700
commit8336a64eb75cba4cc4749d9c4770fef53afdc1ad (patch)
treebf2ab470bd99ad8c0d989ed0a286eed338c0cc38 /fs/xfs/libxfs/xfs_fs.h
parentd728f4e3b21e74910e370b09bab54629eb66badb (diff)
xfs: don't complain about unfixed metadata when repairs were injected
While debugging other parts of online repair, I noticed that if someone injects FORCE_SCRUB_REPAIR, starts an IFLAG_REPAIR scrub on a piece of metadata, and the metadata repair fails, we'll log a message about uncorrected errors in the filesystem. This isn't strictly true if the scrub function didn't set OFLAG_CORRUPT and we're only doing the repair because the error injection knob is set. Repair functions are allowed to abort the entire operation at any point before committing new metadata, in which case the piece of metadata is in the same state as it was before. Therefore, the log message should be gated on the results of the scrub. Refactor the predicate and rearrange the code flow to make this happen. Note: If the repair function errors out after it commits the new metadata, the transaction cancellation will shut down the filesystem, which is an obvious sign of corrupt metadata. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_fs.h')
0 files changed, 0 insertions, 0 deletions