Re: [PATCH] xfs: on memory failure, only shut down fs after scanning all mappings

From: Dave Chinner
Date: Sun Aug 21 2022 - 19:33:04 EST


On Thu, Aug 18, 2022 at 10:00:17AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
>
> xfs_dax_failure_fn is used to scan the filesystem during a memory
> failure event to look for memory mappings to revoke. Unfortunately, if
> it encounters an rmap record for filesystem metadata, it will shut down
> the filesystem and the scan immediately. This means that we don't
> complete the mapping revocation scan and instead leave live mappings to
> failed memory. Fix the function to defer the shutdown until after we've
> finished culling mappings.
>
> While we're at it, add the usual "xfs_" prefix to struct failure_info,
> and actually initialize mf_flags.
>
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Looks fine.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
--
Dave Chinner
david@xxxxxxxxxxxxx