diff options
Diffstat (limited to 'fs/gfs2/util.h')
| -rw-r--r-- | fs/gfs2/util.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index b7ffb09b99ea..cbdcbdf39614 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h | |||
| @@ -10,22 +10,23 @@ | |||
| 10 | #ifndef __UTIL_DOT_H__ | 10 | #ifndef __UTIL_DOT_H__ |
| 11 | #define __UTIL_DOT_H__ | 11 | #define __UTIL_DOT_H__ |
| 12 | 12 | ||
| 13 | #ifdef pr_fmt | ||
| 14 | #undef pr_fmt | ||
| 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 16 | #endif | ||
| 17 | |||
| 13 | #include <linux/mempool.h> | 18 | #include <linux/mempool.h> |
| 14 | 19 | ||
| 15 | #include "incore.h" | 20 | #include "incore.h" |
| 16 | 21 | ||
| 17 | #define fs_printk(level, fs, fmt, arg...) \ | 22 | #define fs_emerg(fs, fmt, ...) \ |
| 18 | printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg) | 23 | pr_emerg("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) |
| 19 | 24 | #define fs_warn(fs, fmt, ...) \ | |
| 20 | #define fs_info(fs, fmt, arg...) \ | 25 | pr_warn("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) |
| 21 | fs_printk(KERN_INFO , fs , fmt , ## arg) | 26 | #define fs_err(fs, fmt, ...) \ |
| 22 | 27 | pr_err("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) | |
| 23 | #define fs_warn(fs, fmt, arg...) \ | 28 | #define fs_info(fs, fmt, ...) \ |
| 24 | fs_printk(KERN_WARNING , fs , fmt , ## arg) | 29 | pr_info("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) |
| 25 | |||
| 26 | #define fs_err(fs, fmt, arg...) \ | ||
| 27 | fs_printk(KERN_ERR, fs , fmt , ## arg) | ||
| 28 | |||
| 29 | 30 | ||
| 30 | void gfs2_assert_i(struct gfs2_sbd *sdp); | 31 | void gfs2_assert_i(struct gfs2_sbd *sdp); |
| 31 | 32 | ||
| @@ -85,7 +86,7 @@ static inline int gfs2_meta_check(struct gfs2_sbd *sdp, | |||
| 85 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; | 86 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; |
| 86 | u32 magic = be32_to_cpu(mh->mh_magic); | 87 | u32 magic = be32_to_cpu(mh->mh_magic); |
| 87 | if (unlikely(magic != GFS2_MAGIC)) { | 88 | if (unlikely(magic != GFS2_MAGIC)) { |
| 88 | printk(KERN_ERR "GFS2: Magic number missing at %llu\n", | 89 | pr_err("Magic number missing at %llu\n", |
| 89 | (unsigned long long)bh->b_blocknr); | 90 | (unsigned long long)bh->b_blocknr); |
| 90 | return -EIO; | 91 | return -EIO; |
| 91 | } | 92 | } |
| @@ -164,7 +165,7 @@ static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt, | |||
| 164 | #define gfs2_tune_get(sdp, field) \ | 165 | #define gfs2_tune_get(sdp, field) \ |
| 165 | gfs2_tune_get_i(&(sdp)->sd_tune, &(sdp)->sd_tune.field) | 166 | gfs2_tune_get_i(&(sdp)->sd_tune, &(sdp)->sd_tune.field) |
| 166 | 167 | ||
| 167 | int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...); | 168 | __printf(2, 3) |
| 169 | int gfs2_lm_withdraw(struct gfs2_sbd *sdp, const char *fmt, ...); | ||
| 168 | 170 | ||
| 169 | #endif /* __UTIL_DOT_H__ */ | 171 | #endif /* __UTIL_DOT_H__ */ |
| 170 | |||
