hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/fs/xfs/xfs_error.h
....@@ -12,16 +12,17 @@
1212 const char *filename, int linenum,
1313 xfs_failaddr_t failaddr);
1414 extern void xfs_corruption_error(const char *tag, int level,
15
- struct xfs_mount *mp, void *buf, size_t bufsize,
15
+ struct xfs_mount *mp, const void *buf, size_t bufsize,
1616 const char *filename, int linenum,
1717 xfs_failaddr_t failaddr);
18
+void xfs_buf_corruption_error(struct xfs_buf *bp, xfs_failaddr_t fa);
1819 extern void xfs_buf_verifier_error(struct xfs_buf *bp, int error,
19
- const char *name, void *buf, size_t bufsz,
20
+ const char *name, const void *buf, size_t bufsz,
2021 xfs_failaddr_t failaddr);
2122 extern void xfs_verifier_error(struct xfs_buf *bp, int error,
2223 xfs_failaddr_t failaddr);
2324 extern void xfs_inode_verifier_error(struct xfs_inode *ip, int error,
24
- const char *name, void *buf, size_t bufsz,
25
+ const char *name, const void *buf, size_t bufsz,
2526 xfs_failaddr_t failaddr);
2627
2728 #define XFS_ERROR_REPORT(e, lvl, mp) \
....@@ -36,32 +37,6 @@
3637
3738 /* Dump 128 bytes of any corrupt buffer */
3839 #define XFS_CORRUPTION_DUMP_LEN (128)
39
-
40
-/*
41
- * Macros to set EFSCORRUPTED & return/branch.
42
- */
43
-#define XFS_WANT_CORRUPTED_GOTO(mp, x, l) \
44
- { \
45
- int fs_is_ok = (x); \
46
- ASSERT(fs_is_ok); \
47
- if (unlikely(!fs_is_ok)) { \
48
- XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_GOTO", \
49
- XFS_ERRLEVEL_LOW, mp); \
50
- error = -EFSCORRUPTED; \
51
- goto l; \
52
- } \
53
- }
54
-
55
-#define XFS_WANT_CORRUPTED_RETURN(mp, x) \
56
- { \
57
- int fs_is_ok = (x); \
58
- ASSERT(fs_is_ok); \
59
- if (unlikely(!fs_is_ok)) { \
60
- XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_RETURN", \
61
- XFS_ERRLEVEL_LOW, mp); \
62
- return -EFSCORRUPTED; \
63
- } \
64
- }
6540
6641 #ifdef DEBUG
6742 extern int xfs_errortag_init(struct xfs_mount *mp);
....@@ -98,5 +73,6 @@
9873 #define XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
9974 #define XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
10075 #define XFS_PTAG_FSBLOCK_ZERO 0x00000080
76
+#define XFS_PTAG_VERIFIER_ERROR 0x00000100
10177
10278 #endif /* __XFS_ERROR_H__ */