Blame view
fs/xfs/xfs_error.h
2.85 KB
0b61f8a40 xfs: convert to S... |
1 |
// SPDX-License-Identifier: GPL-2.0 |
1da177e4c Linux-2.6.12-rc2 |
2 |
/* |
7b7187698 [XFS] Update lice... |
3 4 |
* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. * All Rights Reserved. |
1da177e4c Linux-2.6.12-rc2 |
5 6 7 |
*/ #ifndef __XFS_ERROR_H__ #define __XFS_ERROR_H__ |
1da177e4c Linux-2.6.12-rc2 |
8 |
struct xfs_mount; |
a0e856b0b xfs: add const qu... |
9 |
extern void xfs_error_report(const char *tag, int level, struct xfs_mount *mp, |
d9418ed08 xfs: teach error ... |
10 11 |
const char *filename, int linenum, xfs_failaddr_t failaddr); |
a0e856b0b xfs: add const qu... |
12 |
extern void xfs_corruption_error(const char *tag, int level, |
d243b89a6 xfs: constify the... |
13 |
struct xfs_mount *mp, const void *buf, size_t bufsize, |
2551a5305 xfs: explicitly p... |
14 15 |
const char *filename, int linenum, xfs_failaddr_t failaddr); |
e83cf875d xfs: xfs_buf_corr... |
16 |
void xfs_buf_corruption_error(struct xfs_buf *bp, xfs_failaddr_t fa); |
6edb18105 xfs: refactor ino... |
17 |
extern void xfs_buf_verifier_error(struct xfs_buf *bp, int error, |
d243b89a6 xfs: constify the... |
18 |
const char *name, const void *buf, size_t bufsz, |
6edb18105 xfs: refactor ino... |
19 |
xfs_failaddr_t failaddr); |
bc1a09b8e xfs: refactor ver... |
20 21 |
extern void xfs_verifier_error(struct xfs_buf *bp, int error, xfs_failaddr_t failaddr); |
22431bf3d xfs: refactor ino... |
22 |
extern void xfs_inode_verifier_error(struct xfs_inode *ip, int error, |
d243b89a6 xfs: constify the... |
23 |
const char *name, const void *buf, size_t bufsz, |
22431bf3d xfs: refactor ino... |
24 |
xfs_failaddr_t failaddr); |
1da177e4c Linux-2.6.12-rc2 |
25 |
|
1da177e4c Linux-2.6.12-rc2 |
26 27 |
#define XFS_ERROR_REPORT(e, lvl, mp) \ xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address) |
2551a5305 xfs: explicitly p... |
28 29 |
#define XFS_CORRUPTION_ERROR(e, lvl, mp, buf, bufsize) \ xfs_corruption_error(e, lvl, mp, buf, bufsize, \ |
1da177e4c Linux-2.6.12-rc2 |
30 31 32 33 34 |
__FILE__, __LINE__, __return_address) #define XFS_ERRLEVEL_OFF 0 #define XFS_ERRLEVEL_LOW 1 #define XFS_ERRLEVEL_HIGH 5 |
9c712a134 xfs: dump the fir... |
35 36 |
/* Dump 128 bytes of any corrupt buffer */ #define XFS_CORRUPTION_DUMP_LEN (128) |
1550d0b0b [XFS] kill INDUCE... |
37 |
#ifdef DEBUG |
31965ef34 xfs: make errorta... |
38 39 40 41 |
extern int xfs_errortag_init(struct xfs_mount *mp); extern void xfs_errortag_del(struct xfs_mount *mp); extern bool xfs_errortag_test(struct xfs_mount *mp, const char *expression, const char *file, int line, unsigned int error_tag); |
9e24cfd04 xfs: remove unnee... |
42 |
#define XFS_TEST_ERROR(expr, mp, tag) \ |
31965ef34 xfs: make errorta... |
43 |
((expr) || xfs_errortag_test((mp), #expr, __FILE__, __LINE__, (tag))) |
1da177e4c Linux-2.6.12-rc2 |
44 |
|
c68401011 xfs: expose error... |
45 |
extern int xfs_errortag_get(struct xfs_mount *mp, unsigned int error_tag); |
31965ef34 xfs: make errorta... |
46 47 48 49 |
extern int xfs_errortag_set(struct xfs_mount *mp, unsigned int error_tag, unsigned int tag_value); extern int xfs_errortag_add(struct xfs_mount *mp, unsigned int error_tag); extern int xfs_errortag_clearall(struct xfs_mount *mp); |
1da177e4c Linux-2.6.12-rc2 |
50 |
#else |
31965ef34 xfs: make errorta... |
51 52 |
#define xfs_errortag_init(mp) (0) #define xfs_errortag_del(mp) |
9e24cfd04 xfs: remove unnee... |
53 |
#define XFS_TEST_ERROR(expr, mp, tag) (expr) |
31965ef34 xfs: make errorta... |
54 55 56 |
#define xfs_errortag_set(mp, tag, val) (ENOSYS) #define xfs_errortag_add(mp, tag) (ENOSYS) #define xfs_errortag_clearall(mp) (ENOSYS) |
1550d0b0b [XFS] kill INDUCE... |
57 |
#endif /* DEBUG */ |
1da177e4c Linux-2.6.12-rc2 |
58 59 |
/* |
6a19d9393 xfs: convert xfs_... |
60 61 |
* XFS panic tags -- allow a call to xfs_alert_tag() be turned into * a panic by setting xfs_panic_mask in a sysctl. |
1da177e4c Linux-2.6.12-rc2 |
62 63 64 65 66 67 68 69 70 |
*/ #define XFS_NO_PTAG 0 #define XFS_PTAG_IFLUSH 0x00000001 #define XFS_PTAG_LOGRES 0x00000002 #define XFS_PTAG_AILDELETE 0x00000004 #define XFS_PTAG_ERROR_REPORT 0x00000008 #define XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010 #define XFS_PTAG_SHUTDOWN_IOERROR 0x00000020 #define XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040 |
572d95f49 [XFS] Improve err... |
71 |
#define XFS_PTAG_FSBLOCK_ZERO 0x00000080 |
d519da41e xfs: Introduce XF... |
72 |
#define XFS_PTAG_VERIFIER_ERROR 0x00000100 |
1da177e4c Linux-2.6.12-rc2 |
73 |
|
1da177e4c Linux-2.6.12-rc2 |
74 |
#endif /* __XFS_ERROR_H__ */ |