Skip to content

Commit 9450321

Browse files
Darrick J. Wongbrauner
authored andcommitted
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 <djwong@kernel.org> Link: https://patch.msgid.link/176826402673.3490369.1672039530408369208.stgit@frogsfrogsfrogs Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent efd87a1 commit 9450321

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

fs/xfs/xfs_notify_failure.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/mm.h>
2727
#include <linux/dax.h>
2828
#include <linux/fs.h>
29+
#include <linux/fserror.h>
2930

3031
struct xfs_failure_info {
3132
xfs_agblock_t startblock;
@@ -116,6 +117,9 @@ xfs_dax_failure_fn(
116117
invalidate_inode_pages2_range(mapping, pgoff,
117118
pgoff + pgcnt - 1);
118119

120+
fserror_report_data_lost(VFS_I(ip), (u64)pgoff << PAGE_SHIFT,
121+
(u64)pgcnt << PAGE_SHIFT, GFP_NOFS);
122+
119123
xfs_irele(ip);
120124
return error;
121125
}

0 commit comments

Comments
 (0)