diff options
author | Joe Perches <joe@perches.com> | 2014-03-06 15:10:45 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-03-07 04:30:51 -0500 |
commit | d77d1b58aaf4456946b8502c67f16b52fda60303 (patch) | |
tree | 5d829949b7ce4bfcb31c9517a418931d31e48ac2 | |
parent | a17d758b661d6fa01a0d466d7bdda3c131bb68f9 (diff) |
GFS2: Use pr_<level> more consistently
Add pr_fmt, remove embedded "GFS2: " prefixes.
This now consistently emits lower case "gfs2: " for each message.
Other miscellanea around these changes:
o Add missing newlines
o Coalesce formats
o Realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/dir.c | 14 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 8 | ||||
-rw-r--r-- | fs/gfs2/lock_dlm.c | 9 | ||||
-rw-r--r-- | fs/gfs2/main.c | 2 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 18 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 10 | ||||
-rw-r--r-- | fs/gfs2/rgrp.c | 24 | ||||
-rw-r--r-- | fs/gfs2/super.c | 16 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 2 | ||||
-rw-r--r-- | fs/gfs2/trans.c | 19 | ||||
-rw-r--r-- | fs/gfs2/util.c | 12 | ||||
-rw-r--r-- | fs/gfs2/util.h | 25 |
12 files changed, 88 insertions, 71 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 39c7081e4c12..1a349f9a9685 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -53,6 +53,8 @@ | |||
53 | * but never before the maximum hash table size has been reached. | 53 | * but never before the maximum hash table size has been reached. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
57 | |||
56 | #include <linux/slab.h> | 58 | #include <linux/slab.h> |
57 | #include <linux/spinlock.h> | 59 | #include <linux/spinlock.h> |
58 | #include <linux/buffer_head.h> | 60 | #include <linux/buffer_head.h> |
@@ -507,8 +509,8 @@ static int gfs2_check_dirent(struct gfs2_dirent *dent, unsigned int offset, | |||
507 | goto error; | 509 | goto error; |
508 | return 0; | 510 | return 0; |
509 | error: | 511 | error: |
510 | pr_warn("gfs2_check_dirent: %s (%s)\n", msg, | 512 | pr_warn("%s: %s (%s)\n", |
511 | first ? "first in block" : "not first in block"); | 513 | __func__, msg, first ? "first in block" : "not first in block"); |
512 | return -EIO; | 514 | return -EIO; |
513 | } | 515 | } |
514 | 516 | ||
@@ -531,8 +533,7 @@ static int gfs2_dirent_offset(const void *buf) | |||
531 | } | 533 | } |
532 | return offset; | 534 | return offset; |
533 | wrong_type: | 535 | wrong_type: |
534 | pr_warn("gfs2_scan_dirent: wrong block type %u\n", | 536 | pr_warn("%s: wrong block type %u\n", __func__, be32_to_cpu(h->mh_type)); |
535 | be32_to_cpu(h->mh_type)); | ||
536 | return -1; | 537 | return -1; |
537 | } | 538 | } |
538 | 539 | ||
@@ -728,7 +729,7 @@ static int get_leaf(struct gfs2_inode *dip, u64 leaf_no, | |||
728 | 729 | ||
729 | error = gfs2_meta_read(dip->i_gl, leaf_no, DIO_WAIT, bhp); | 730 | error = gfs2_meta_read(dip->i_gl, leaf_no, DIO_WAIT, bhp); |
730 | if (!error && gfs2_metatype_check(GFS2_SB(&dip->i_inode), *bhp, GFS2_METATYPE_LF)) { | 731 | if (!error && gfs2_metatype_check(GFS2_SB(&dip->i_inode), *bhp, GFS2_METATYPE_LF)) { |
731 | /* printk(KERN_INFO "block num=%llu\n", leaf_no); */ | 732 | /* pr_info("block num=%llu\n", leaf_no); */ |
732 | error = -EIO; | 733 | error = -EIO; |
733 | } | 734 | } |
734 | 735 | ||
@@ -1006,7 +1007,8 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) | |||
1006 | len = 1 << (dip->i_depth - be16_to_cpu(oleaf->lf_depth)); | 1007 | len = 1 << (dip->i_depth - be16_to_cpu(oleaf->lf_depth)); |
1007 | half_len = len >> 1; | 1008 | half_len = len >> 1; |
1008 | if (!half_len) { | 1009 | if (!half_len) { |
1009 | pr_warn("i_depth %u lf_depth %u index %u\n", dip->i_depth, be16_to_cpu(oleaf->lf_depth), index); | 1010 | pr_warn("i_depth %u lf_depth %u index %u\n", |
1011 | dip->i_depth, be16_to_cpu(oleaf->lf_depth), index); | ||
1010 | gfs2_consist_inode(dip); | 1012 | gfs2_consist_inode(dip); |
1011 | error = -EIO; | 1013 | error = -EIO; |
1012 | goto fail_brelse; | 1014 | goto fail_brelse; |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 329dc801df4e..52f747858f55 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
@@ -468,7 +470,7 @@ retry: | |||
468 | do_xmote(gl, gh, LM_ST_UNLOCKED); | 470 | do_xmote(gl, gh, LM_ST_UNLOCKED); |
469 | break; | 471 | break; |
470 | default: /* Everything else */ | 472 | default: /* Everything else */ |
471 | pr_err("GFS2: wanted %u got %u\n", gl->gl_target, state); | 473 | pr_err("wanted %u got %u\n", gl->gl_target, state); |
472 | GLOCK_BUG_ON(gl, 1); | 474 | GLOCK_BUG_ON(gl, 1); |
473 | } | 475 | } |
474 | spin_unlock(&gl->gl_spin); | 476 | spin_unlock(&gl->gl_spin); |
@@ -542,7 +544,7 @@ __acquires(&gl->gl_spin) | |||
542 | /* lock_dlm */ | 544 | /* lock_dlm */ |
543 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); | 545 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); |
544 | if (ret) { | 546 | if (ret) { |
545 | pr_err("GFS2: lm_lock ret %d\n", ret); | 547 | pr_err("lm_lock ret %d\n", ret); |
546 | GLOCK_BUG_ON(gl, 1); | 548 | GLOCK_BUG_ON(gl, 1); |
547 | } | 549 | } |
548 | } else { /* lock_nolock */ | 550 | } else { /* lock_nolock */ |
@@ -935,7 +937,7 @@ void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...) | |||
935 | vaf.fmt = fmt; | 937 | vaf.fmt = fmt; |
936 | vaf.va = &args; | 938 | vaf.va = &args; |
937 | 939 | ||
938 | pr_err(" %pV", &vaf); | 940 | pr_err("%pV", &vaf); |
939 | } | 941 | } |
940 | 942 | ||
941 | va_end(args); | 943 | va_end(args); |
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index a664dddd91b1..c1eb555dc588 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
11 | #include <linux/dlm.h> | 13 | #include <linux/dlm.h> |
12 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
@@ -176,7 +178,7 @@ static void gdlm_bast(void *arg, int mode) | |||
176 | gfs2_glock_cb(gl, LM_ST_SHARED); | 178 | gfs2_glock_cb(gl, LM_ST_SHARED); |
177 | break; | 179 | break; |
178 | default: | 180 | default: |
179 | pr_err("unknown bast mode %d", mode); | 181 | pr_err("unknown bast mode %d\n", mode); |
180 | BUG(); | 182 | BUG(); |
181 | } | 183 | } |
182 | } | 184 | } |
@@ -195,7 +197,7 @@ static int make_mode(const unsigned int lmstate) | |||
195 | case LM_ST_SHARED: | 197 | case LM_ST_SHARED: |
196 | return DLM_LOCK_PR; | 198 | return DLM_LOCK_PR; |
197 | } | 199 | } |
198 | pr_err("unknown LM state %d", lmstate); | 200 | pr_err("unknown LM state %d\n", lmstate); |
199 | BUG(); | 201 | BUG(); |
200 | return -1; | 202 | return -1; |
201 | } | 203 | } |
@@ -308,7 +310,8 @@ static void gdlm_put_lock(struct gfs2_glock *gl) | |||
308 | error = dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_VALBLK, | 310 | error = dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_VALBLK, |
309 | NULL, gl); | 311 | NULL, gl); |
310 | if (error) { | 312 | if (error) { |
311 | pr_err("gdlm_unlock %x,%llx err=%d\n", gl->gl_name.ln_type, | 313 | pr_err("gdlm_unlock %x,%llx err=%d\n", |
314 | gl->gl_name.ln_type, | ||
312 | (unsigned long long)gl->gl_name.ln_number, error); | 315 | (unsigned long long)gl->gl_name.ln_number, error); |
313 | return; | 316 | return; |
314 | } | 317 | } |
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index ae9b02bb193a..82b6ac829656 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
11 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 14 | #include <linux/completion.h> |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index ea9c35cae757..fba74a26a6a3 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
@@ -150,7 +152,7 @@ static int gfs2_check_sb(struct gfs2_sbd *sdp, int silent) | |||
150 | if (sb->sb_magic != GFS2_MAGIC || | 152 | if (sb->sb_magic != GFS2_MAGIC || |
151 | sb->sb_type != GFS2_METATYPE_SB) { | 153 | sb->sb_type != GFS2_METATYPE_SB) { |
152 | if (!silent) | 154 | if (!silent) |
153 | pr_warn("GFS2: not a GFS2 filesystem\n"); | 155 | pr_warn("not a GFS2 filesystem\n"); |
154 | return -EINVAL; | 156 | return -EINVAL; |
155 | } | 157 | } |
156 | 158 | ||
@@ -172,7 +174,7 @@ static void end_bio_io_page(struct bio *bio, int error) | |||
172 | if (!error) | 174 | if (!error) |
173 | SetPageUptodate(page); | 175 | SetPageUptodate(page); |
174 | else | 176 | else |
175 | pr_warn("gfs2: error %d reading superblock\n", error); | 177 | pr_warn("error %d reading superblock\n", error); |
176 | unlock_page(page); | 178 | unlock_page(page); |
177 | } | 179 | } |
178 | 180 | ||
@@ -945,7 +947,7 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent) | |||
945 | lm = &gfs2_dlm_ops; | 947 | lm = &gfs2_dlm_ops; |
946 | #endif | 948 | #endif |
947 | } else { | 949 | } else { |
948 | pr_info("GFS2: can't find protocol %s\n", proto); | 950 | pr_info("can't find protocol %s\n", proto); |
949 | return -ENOENT; | 951 | return -ENOENT; |
950 | } | 952 | } |
951 | 953 | ||
@@ -1052,7 +1054,7 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent | |||
1052 | 1054 | ||
1053 | sdp = init_sbd(sb); | 1055 | sdp = init_sbd(sb); |
1054 | if (!sdp) { | 1056 | if (!sdp) { |
1055 | pr_warn("GFS2: can't alloc struct gfs2_sbd\n"); | 1057 | pr_warn("can't alloc struct gfs2_sbd\n"); |
1056 | return -ENOMEM; | 1058 | return -ENOMEM; |
1057 | } | 1059 | } |
1058 | sdp->sd_args = *args; | 1060 | sdp->sd_args = *args; |
@@ -1300,7 +1302,7 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags, | |||
1300 | 1302 | ||
1301 | error = gfs2_mount_args(&args, data); | 1303 | error = gfs2_mount_args(&args, data); |
1302 | if (error) { | 1304 | if (error) { |
1303 | pr_warn("GFS2: can't parse mount arguments\n"); | 1305 | pr_warn("can't parse mount arguments\n"); |
1304 | goto error_super; | 1306 | goto error_super; |
1305 | } | 1307 | } |
1306 | 1308 | ||
@@ -1350,15 +1352,15 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type, | |||
1350 | 1352 | ||
1351 | error = kern_path(dev_name, LOOKUP_FOLLOW, &path); | 1353 | error = kern_path(dev_name, LOOKUP_FOLLOW, &path); |
1352 | if (error) { | 1354 | if (error) { |
1353 | pr_warn("GFS2: path_lookup on %s returned error %d\n", | 1355 | pr_warn("path_lookup on %s returned error %d\n", |
1354 | dev_name, error); | 1356 | dev_name, error); |
1355 | return ERR_PTR(error); | 1357 | return ERR_PTR(error); |
1356 | } | 1358 | } |
1357 | s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags, | 1359 | s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags, |
1358 | path.dentry->d_inode->i_sb->s_bdev); | 1360 | path.dentry->d_inode->i_sb->s_bdev); |
1359 | path_put(&path); | 1361 | path_put(&path); |
1360 | if (IS_ERR(s)) { | 1362 | if (IS_ERR(s)) { |
1361 | pr_warn("GFS2: gfs2 mount does not exist\n"); | 1363 | pr_warn("gfs2 mount does not exist\n"); |
1362 | return ERR_CAST(s); | 1364 | return ERR_CAST(s); |
1363 | } | 1365 | } |
1364 | if ((flags ^ s->s_flags) & MS_RDONLY) { | 1366 | if ((flags ^ s->s_flags) & MS_RDONLY) { |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 6e25ee490e3b..73ed92535c8a 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -36,6 +36,8 @@ | |||
36 | * the quota file, so it is not being constantly read. | 36 | * the quota file, so it is not being constantly read. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
40 | |||
39 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
40 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
41 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
@@ -1081,10 +1083,10 @@ static int print_message(struct gfs2_quota_data *qd, char *type) | |||
1081 | { | 1083 | { |
1082 | struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; | 1084 | struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; |
1083 | 1085 | ||
1084 | pr_info("GFS2: fsid=%s: quota %s for %s %u\n", | 1086 | pr_info("fsid=%s: quota %s for %s %u\n", |
1085 | sdp->sd_fsname, type, | 1087 | sdp->sd_fsname, type, |
1086 | (qd->qd_id.type == USRQUOTA) ? "user" : "group", | 1088 | (qd->qd_id.type == USRQUOTA) ? "user" : "group", |
1087 | from_kqid(&init_user_ns, qd->qd_id)); | 1089 | from_kqid(&init_user_ns, qd->qd_id)); |
1088 | 1090 | ||
1089 | return 0; | 1091 | return 0; |
1090 | } | 1092 | } |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 8d120386bb79..281a7716e3f3 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
11 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 14 | #include <linux/completion.h> |
@@ -99,12 +101,12 @@ static inline void gfs2_setbit(const struct gfs2_rbm *rbm, bool do_clone, | |||
99 | cur_state = (*byte1 >> bit) & GFS2_BIT_MASK; | 101 | cur_state = (*byte1 >> bit) & GFS2_BIT_MASK; |
100 | 102 | ||
101 | if (unlikely(!valid_change[new_state * 4 + cur_state])) { | 103 | if (unlikely(!valid_change[new_state * 4 + cur_state])) { |
102 | pr_warn("GFS2: buf_blk = 0x%x old_state=%d, " | 104 | pr_warn("buf_blk = 0x%x old_state=%d, new_state=%d\n", |
103 | "new_state=%d\n", rbm->offset, cur_state, new_state); | 105 | rbm->offset, cur_state, new_state); |
104 | pr_warn("GFS2: rgrp=0x%llx bi_start=0x%x\n", | 106 | pr_warn("rgrp=0x%llx bi_start=0x%x\n", |
105 | (unsigned long long)rbm->rgd->rd_addr, bi->bi_start); | 107 | (unsigned long long)rbm->rgd->rd_addr, bi->bi_start); |
106 | pr_warn("GFS2: bi_offset=0x%x bi_len=0x%x\n", | 108 | pr_warn("bi_offset=0x%x bi_len=0x%x\n", |
107 | bi->bi_offset, bi->bi_len); | 109 | bi->bi_offset, bi->bi_len); |
108 | dump_stack(); | 110 | dump_stack(); |
109 | gfs2_consist_rgrpd(rbm->rgd); | 111 | gfs2_consist_rgrpd(rbm->rgd); |
110 | return; | 112 | return; |
@@ -736,11 +738,11 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp) | |||
736 | 738 | ||
737 | static void gfs2_rindex_print(const struct gfs2_rgrpd *rgd) | 739 | static void gfs2_rindex_print(const struct gfs2_rgrpd *rgd) |
738 | { | 740 | { |
739 | pr_info(" ri_addr = %llu\n", (unsigned long long)rgd->rd_addr); | 741 | pr_info("ri_addr = %llu\n", (unsigned long long)rgd->rd_addr); |
740 | pr_info(" ri_length = %u\n", rgd->rd_length); | 742 | pr_info("ri_length = %u\n", rgd->rd_length); |
741 | pr_info(" ri_data0 = %llu\n", (unsigned long long)rgd->rd_data0); | 743 | pr_info("ri_data0 = %llu\n", (unsigned long long)rgd->rd_data0); |
742 | pr_info(" ri_data = %u\n", rgd->rd_data); | 744 | pr_info("ri_data = %u\n", rgd->rd_data); |
743 | pr_info(" ri_bitbytes = %u\n", rgd->rd_bitbytes); | 745 | pr_info("ri_bitbytes = %u\n", rgd->rd_bitbytes); |
744 | } | 746 | } |
745 | 747 | ||
746 | /** | 748 | /** |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 584c757569a5..a08c66e270bf 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
11 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
@@ -175,8 +177,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
175 | break; | 177 | break; |
176 | case Opt_debug: | 178 | case Opt_debug: |
177 | if (args->ar_errors == GFS2_ERRORS_PANIC) { | 179 | if (args->ar_errors == GFS2_ERRORS_PANIC) { |
178 | pr_warn("GFS2: -o debug and -o errors=panic " | 180 | pr_warn("-o debug and -o errors=panic are mutually exclusive\n"); |
179 | "are mutually exclusive.\n"); | ||
180 | return -EINVAL; | 181 | return -EINVAL; |
181 | } | 182 | } |
182 | args->ar_debug = 1; | 183 | args->ar_debug = 1; |
@@ -228,21 +229,21 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
228 | case Opt_commit: | 229 | case Opt_commit: |
229 | rv = match_int(&tmp[0], &args->ar_commit); | 230 | rv = match_int(&tmp[0], &args->ar_commit); |
230 | if (rv || args->ar_commit <= 0) { | 231 | if (rv || args->ar_commit <= 0) { |
231 | pr_warn("GFS2: commit mount option requires a positive numeric argument\n"); | 232 | pr_warn("commit mount option requires a positive numeric argument\n"); |
232 | return rv ? rv : -EINVAL; | 233 | return rv ? rv : -EINVAL; |
233 | } | 234 | } |
234 | break; | 235 | break; |
235 | case Opt_statfs_quantum: | 236 | case Opt_statfs_quantum: |
236 | rv = match_int(&tmp[0], &args->ar_statfs_quantum); | 237 | rv = match_int(&tmp[0], &args->ar_statfs_quantum); |
237 | if (rv || args->ar_statfs_quantum < 0) { | 238 | if (rv || args->ar_statfs_quantum < 0) { |
238 | pr_warn("GFS2: statfs_quantum mount option requires a non-negative numeric argument\n"); | 239 | pr_warn("statfs_quantum mount option requires a non-negative numeric argument\n"); |
239 | return rv ? rv : -EINVAL; | 240 | return rv ? rv : -EINVAL; |
240 | } | 241 | } |
241 | break; | 242 | break; |
242 | case Opt_quota_quantum: | 243 | case Opt_quota_quantum: |
243 | rv = match_int(&tmp[0], &args->ar_quota_quantum); | 244 | rv = match_int(&tmp[0], &args->ar_quota_quantum); |
244 | if (rv || args->ar_quota_quantum <= 0) { | 245 | if (rv || args->ar_quota_quantum <= 0) { |
245 | pr_warn("GFS2: quota_quantum mount option requires a positive numeric argument\n"); | 246 | pr_warn("quota_quantum mount option requires a positive numeric argument\n"); |
246 | return rv ? rv : -EINVAL; | 247 | return rv ? rv : -EINVAL; |
247 | } | 248 | } |
248 | break; | 249 | break; |
@@ -259,8 +260,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
259 | break; | 260 | break; |
260 | case Opt_err_panic: | 261 | case Opt_err_panic: |
261 | if (args->ar_debug) { | 262 | if (args->ar_debug) { |
262 | pr_warn("GFS2: -o debug and -o errors=panic " | 263 | pr_warn("-o debug and -o errors=panic are mutually exclusive\n"); |
263 | "are mutually exclusive.\n"); | ||
264 | return -EINVAL; | 264 | return -EINVAL; |
265 | } | 265 | } |
266 | args->ar_errors = GFS2_ERRORS_PANIC; | 266 | args->ar_errors = GFS2_ERRORS_PANIC; |
@@ -279,7 +279,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
279 | break; | 279 | break; |
280 | case Opt_error: | 280 | case Opt_error: |
281 | default: | 281 | default: |
282 | pr_warn("GFS2: invalid mount option: %s\n", o); | 282 | pr_warn("invalid mount option: %s\n", o); |
283 | return -EINVAL; | 283 | return -EINVAL; |
284 | } | 284 | } |
285 | } | 285 | } |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index d09f6edda0ff..256354cba4dd 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
11 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 14 | #include <linux/completion.h> |
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 3fe8e34a9f5c..bead90d27bad 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
@@ -99,13 +101,13 @@ static void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks) | |||
99 | 101 | ||
100 | static void gfs2_print_trans(const struct gfs2_trans *tr) | 102 | static void gfs2_print_trans(const struct gfs2_trans *tr) |
101 | { | 103 | { |
102 | pr_warn("GFS2: Transaction created at: %pSR\n", (void *)tr->tr_ip); | 104 | pr_warn("Transaction created at: %pSR\n", (void *)tr->tr_ip); |
103 | pr_warn("GFS2: blocks=%u revokes=%u reserved=%u touched=%u\n", | 105 | pr_warn("blocks=%u revokes=%u reserved=%u touched=%u\n", |
104 | tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched); | 106 | tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched); |
105 | pr_warn("GFS2: Buf %u/%u Databuf %u/%u Revoke %u/%u\n", | 107 | pr_warn("Buf %u/%u Databuf %u/%u Revoke %u/%u\n", |
106 | tr->tr_num_buf_new, tr->tr_num_buf_rm, | 108 | tr->tr_num_buf_new, tr->tr_num_buf_rm, |
107 | tr->tr_num_databuf_new, tr->tr_num_databuf_rm, | 109 | tr->tr_num_databuf_new, tr->tr_num_databuf_rm, |
108 | tr->tr_num_revoke, tr->tr_num_revoke_rm); | 110 | tr->tr_num_revoke, tr->tr_num_revoke_rm); |
109 | } | 111 | } |
110 | 112 | ||
111 | void gfs2_trans_end(struct gfs2_sbd *sdp) | 113 | void gfs2_trans_end(struct gfs2_sbd *sdp) |
@@ -231,8 +233,7 @@ static void meta_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) | |||
231 | set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); | 233 | set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); |
232 | mh = (struct gfs2_meta_header *)bd->bd_bh->b_data; | 234 | mh = (struct gfs2_meta_header *)bd->bd_bh->b_data; |
233 | if (unlikely(mh->mh_magic != cpu_to_be32(GFS2_MAGIC))) { | 235 | if (unlikely(mh->mh_magic != cpu_to_be32(GFS2_MAGIC))) { |
234 | pr_err("Attempting to add uninitialised block to journal " | 236 | pr_err("Attempting to add uninitialised block to journal (inplace block=%lld)\n", |
235 | "(inplace block=%lld)\n", | ||
236 | (unsigned long long)bd->bd_bh->b_blocknr); | 237 | (unsigned long long)bd->bd_bh->b_blocknr); |
237 | BUG(); | 238 | BUG(); |
238 | } | 239 | } |
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index e9d700194015..02fb38db9d19 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
11 | #include <linux/completion.h> | 13 | #include <linux/completion.h> |
12 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
@@ -30,7 +32,7 @@ mempool_t *gfs2_page_pool __read_mostly; | |||
30 | 32 | ||
31 | void gfs2_assert_i(struct gfs2_sbd *sdp) | 33 | void gfs2_assert_i(struct gfs2_sbd *sdp) |
32 | { | 34 | { |
33 | pr_emerg("GFS2: fsid=%s: fatal assertion failed\n", sdp->sd_fsname); | 35 | pr_emerg("fsid=%s: fatal assertion failed\n", sdp->sd_fsname); |
34 | } | 36 | } |
35 | 37 | ||
36 | int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) | 38 | int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) |
@@ -65,7 +67,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) | |||
65 | } | 67 | } |
66 | 68 | ||
67 | if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC) | 69 | if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC) |
68 | panic("GFS2: fsid=%s: panic requested.\n", sdp->sd_fsname); | 70 | panic("GFS2: fsid=%s: panic requested\n", sdp->sd_fsname); |
69 | 71 | ||
70 | return -1; | 72 | return -1; |
71 | } | 73 | } |
@@ -104,10 +106,8 @@ int gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion, | |||
104 | return -2; | 106 | return -2; |
105 | 107 | ||
106 | if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW) | 108 | if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW) |
107 | pr_warn("GFS2: fsid=%s: warning: assertion \"%s\" failed\n" | 109 | pr_warn("fsid=%s: warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n", |
108 | "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", | 110 | sdp->sd_fsname, assertion, function, file, line); |
109 | sdp->sd_fsname, assertion, | ||
110 | sdp->sd_fsname, function, file, line); | ||
111 | 111 | ||
112 | if (sdp->sd_args.ar_debug) | 112 | if (sdp->sd_args.ar_debug) |
113 | BUG(); | 113 | BUG(); |
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index b7ffb09b99ea..d365733744d7 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h | |||
@@ -10,22 +10,21 @@ | |||
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_warn(fs, fmt, ...) \ |
18 | printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg) | 23 | pr_warn("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) |
19 | 24 | #define fs_err(fs, fmt, ...) \ | |
20 | #define fs_info(fs, fmt, arg...) \ | 25 | pr_err("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) |
21 | fs_printk(KERN_INFO , fs , fmt , ## arg) | 26 | #define fs_info(fs, fmt, ...) \ |
22 | 27 | pr_info("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__) | |
23 | #define fs_warn(fs, fmt, arg...) \ | ||
24 | fs_printk(KERN_WARNING , fs , fmt , ## arg) | ||
25 | |||
26 | #define fs_err(fs, fmt, arg...) \ | ||
27 | fs_printk(KERN_ERR, fs , fmt , ## arg) | ||
28 | |||
29 | 28 | ||
30 | void gfs2_assert_i(struct gfs2_sbd *sdp); | 29 | void gfs2_assert_i(struct gfs2_sbd *sdp); |
31 | 30 | ||
@@ -85,7 +84,7 @@ static inline int gfs2_meta_check(struct gfs2_sbd *sdp, | |||
85 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; | 84 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; |
86 | u32 magic = be32_to_cpu(mh->mh_magic); | 85 | u32 magic = be32_to_cpu(mh->mh_magic); |
87 | if (unlikely(magic != GFS2_MAGIC)) { | 86 | if (unlikely(magic != GFS2_MAGIC)) { |
88 | printk(KERN_ERR "GFS2: Magic number missing at %llu\n", | 87 | pr_err("Magic number missing at %llu\n", |
89 | (unsigned long long)bh->b_blocknr); | 88 | (unsigned long long)bh->b_blocknr); |
90 | return -EIO; | 89 | return -EIO; |
91 | } | 90 | } |