| .. | .. |
|---|
| 12 | 12 | const char *filename, int linenum, |
|---|
| 13 | 13 | xfs_failaddr_t failaddr); |
|---|
| 14 | 14 | 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, |
|---|
| 16 | 16 | const char *filename, int linenum, |
|---|
| 17 | 17 | xfs_failaddr_t failaddr); |
|---|
| 18 | +void xfs_buf_corruption_error(struct xfs_buf *bp, xfs_failaddr_t fa); |
|---|
| 18 | 19 | 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, |
|---|
| 20 | 21 | xfs_failaddr_t failaddr); |
|---|
| 21 | 22 | extern void xfs_verifier_error(struct xfs_buf *bp, int error, |
|---|
| 22 | 23 | xfs_failaddr_t failaddr); |
|---|
| 23 | 24 | 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, |
|---|
| 25 | 26 | xfs_failaddr_t failaddr); |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | #define XFS_ERROR_REPORT(e, lvl, mp) \ |
|---|
| .. | .. |
|---|
| 36 | 37 | |
|---|
| 37 | 38 | /* Dump 128 bytes of any corrupt buffer */ |
|---|
| 38 | 39 | #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 | | - } |
|---|
| 65 | 40 | |
|---|
| 66 | 41 | #ifdef DEBUG |
|---|
| 67 | 42 | extern int xfs_errortag_init(struct xfs_mount *mp); |
|---|
| .. | .. |
|---|
| 98 | 73 | #define XFS_PTAG_SHUTDOWN_IOERROR 0x00000020 |
|---|
| 99 | 74 | #define XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040 |
|---|
| 100 | 75 | #define XFS_PTAG_FSBLOCK_ZERO 0x00000080 |
|---|
| 76 | +#define XFS_PTAG_VERIFIER_ERROR 0x00000100 |
|---|
| 101 | 77 | |
|---|
| 102 | 78 | #endif /* __XFS_ERROR_H__ */ |
|---|