.. | .. |
---|
6 | 6 | #include "xfs.h" |
---|
7 | 7 | #include "xfs_fs.h" |
---|
8 | 8 | #include "xfs_error.h" |
---|
| 9 | +#include "xfs_shared.h" |
---|
9 | 10 | #include "xfs_format.h" |
---|
10 | | -#include "xfs_log_format.h" |
---|
11 | 11 | #include "xfs_trans_resv.h" |
---|
12 | 12 | #include "xfs_mount.h" |
---|
13 | 13 | |
---|
.. | .. |
---|
20 | 20 | const struct xfs_mount *mp, |
---|
21 | 21 | struct va_format *vaf) |
---|
22 | 22 | { |
---|
23 | | - if (mp && mp->m_fsname) { |
---|
24 | | - printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf); |
---|
| 23 | + if (mp && mp->m_super) { |
---|
| 24 | + printk("%sXFS (%s): %pV\n", level, mp->m_super->s_id, vaf); |
---|
25 | 25 | return; |
---|
26 | 26 | } |
---|
27 | 27 | printk("%sXFS: %pV\n", level, vaf); |
---|
.. | .. |
---|
86 | 86 | } |
---|
87 | 87 | |
---|
88 | 88 | void |
---|
89 | | -asswarn(char *expr, char *file, int line) |
---|
| 89 | +asswarn( |
---|
| 90 | + struct xfs_mount *mp, |
---|
| 91 | + char *expr, |
---|
| 92 | + char *file, |
---|
| 93 | + int line) |
---|
90 | 94 | { |
---|
91 | | - xfs_warn(NULL, "Assertion failed: %s, file: %s, line: %d", |
---|
| 95 | + xfs_warn(mp, "Assertion failed: %s, file: %s, line: %d", |
---|
92 | 96 | expr, file, line); |
---|
93 | 97 | WARN_ON(1); |
---|
94 | 98 | } |
---|
95 | 99 | |
---|
96 | 100 | void |
---|
97 | | -assfail(char *expr, char *file, int line) |
---|
| 101 | +assfail( |
---|
| 102 | + struct xfs_mount *mp, |
---|
| 103 | + char *expr, |
---|
| 104 | + char *file, |
---|
| 105 | + int line) |
---|
98 | 106 | { |
---|
99 | | - xfs_emerg(NULL, "Assertion failed: %s, file: %s, line: %d", |
---|
| 107 | + xfs_emerg(mp, "Assertion failed: %s, file: %s, line: %d", |
---|
100 | 108 | expr, file, line); |
---|
101 | 109 | if (xfs_globals.bug_on_assert) |
---|
102 | 110 | BUG(); |
---|
.. | .. |
---|
105 | 113 | } |
---|
106 | 114 | |
---|
107 | 115 | void |
---|
108 | | -xfs_hex_dump(void *p, int length) |
---|
| 116 | +xfs_hex_dump(const void *p, int length) |
---|
109 | 117 | { |
---|
110 | | - print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_ADDRESS, 16, 1, p, length, 1); |
---|
| 118 | + print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_OFFSET, 16, 1, p, length, 1); |
---|
| 119 | +} |
---|
| 120 | + |
---|
| 121 | +void |
---|
| 122 | +xfs_buf_alert_ratelimited( |
---|
| 123 | + struct xfs_buf *bp, |
---|
| 124 | + const char *rlmsg, |
---|
| 125 | + const char *fmt, |
---|
| 126 | + ...) |
---|
| 127 | +{ |
---|
| 128 | + struct xfs_mount *mp = bp->b_mount; |
---|
| 129 | + struct va_format vaf; |
---|
| 130 | + va_list args; |
---|
| 131 | + |
---|
| 132 | + /* use the more aggressive per-target rate limit for buffers */ |
---|
| 133 | + if (!___ratelimit(&bp->b_target->bt_ioerror_rl, rlmsg)) |
---|
| 134 | + return; |
---|
| 135 | + |
---|
| 136 | + va_start(args, fmt); |
---|
| 137 | + vaf.fmt = fmt; |
---|
| 138 | + vaf.va = &args; |
---|
| 139 | + __xfs_printk(KERN_ALERT, mp, &vaf); |
---|
| 140 | + va_end(args); |
---|
111 | 141 | } |
---|