From: Darrick J. Wong Date: Tue, 13 Jan 2026 00:32:12 +0000 (-0800) Subject: xfs: translate fsdax media errors into file "data lost" errors when convenient X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94503211d2fdcc5183d01c2719258a7795cdecb0;p=thirdparty%2Flinux.git xfs: translate fsdax media errors into file "data lost" errors when convenient Translate fsdax persistent failure notifications into file data loss events when it's convenient, aka when the inode is already incore. Signed-off-by: Darrick J. Wong Link: https://patch.msgid.link/176826402673.3490369.1672039530408369208.stgit@frogsfrogsfrogs Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner --- diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c index b176728899420..6d5002413c2cb 100644 --- a/fs/xfs/xfs_notify_failure.c +++ b/fs/xfs/xfs_notify_failure.c @@ -26,6 +26,7 @@ #include #include #include +#include struct xfs_failure_info { xfs_agblock_t startblock; @@ -116,6 +117,9 @@ xfs_dax_failure_fn( invalidate_inode_pages2_range(mapping, pgoff, pgoff + pgcnt - 1); + fserror_report_data_lost(VFS_I(ip), (u64)pgoff << PAGE_SHIFT, + (u64)pgcnt << PAGE_SHIFT, GFP_NOFS); + xfs_irele(ip); return error; }