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>
This commit is contained in:
Joe Perches 2014-03-06 12:10:45 -08:00 committed by Steven Whitehouse
parent a17d758b66
commit d77d1b58aa
12 changed files with 88 additions and 71 deletions

View File

@ -53,6 +53,8 @@
* but never before the maximum hash table size has been reached. * but never before the maximum hash table size has been reached.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
@ -507,8 +509,8 @@ static int gfs2_check_dirent(struct gfs2_dirent *dent, unsigned int offset,
goto error; goto error;
return 0; return 0;
error: error:
pr_warn("gfs2_check_dirent: %s (%s)\n", msg, pr_warn("%s: %s (%s)\n",
first ? "first in block" : "not first in block"); __func__, msg, first ? "first in block" : "not first in block");
return -EIO; return -EIO;
} }
@ -531,8 +533,7 @@ static int gfs2_dirent_offset(const void *buf)
} }
return offset; return offset;
wrong_type: wrong_type:
pr_warn("gfs2_scan_dirent: wrong block type %u\n", pr_warn("%s: wrong block type %u\n", __func__, be32_to_cpu(h->mh_type));
be32_to_cpu(h->mh_type));
return -1; return -1;
} }
@ -728,7 +729,7 @@ static int get_leaf(struct gfs2_inode *dip, u64 leaf_no,
error = gfs2_meta_read(dip->i_gl, leaf_no, DIO_WAIT, bhp); error = gfs2_meta_read(dip->i_gl, leaf_no, DIO_WAIT, bhp);
if (!error && gfs2_metatype_check(GFS2_SB(&dip->i_inode), *bhp, GFS2_METATYPE_LF)) { if (!error && gfs2_metatype_check(GFS2_SB(&dip->i_inode), *bhp, GFS2_METATYPE_LF)) {
/* printk(KERN_INFO "block num=%llu\n", leaf_no); */ /* pr_info("block num=%llu\n", leaf_no); */
error = -EIO; error = -EIO;
} }
@ -1006,7 +1007,8 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
len = 1 << (dip->i_depth - be16_to_cpu(oleaf->lf_depth)); len = 1 << (dip->i_depth - be16_to_cpu(oleaf->lf_depth));
half_len = len >> 1; half_len = len >> 1;
if (!half_len) { if (!half_len) {
pr_warn("i_depth %u lf_depth %u index %u\n", dip->i_depth, be16_to_cpu(oleaf->lf_depth), index); pr_warn("i_depth %u lf_depth %u index %u\n",
dip->i_depth, be16_to_cpu(oleaf->lf_depth), index);
gfs2_consist_inode(dip); gfs2_consist_inode(dip);
error = -EIO; error = -EIO;
goto fail_brelse; goto fail_brelse;

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
@ -468,7 +470,7 @@ retry:
do_xmote(gl, gh, LM_ST_UNLOCKED); do_xmote(gl, gh, LM_ST_UNLOCKED);
break; break;
default: /* Everything else */ default: /* Everything else */
pr_err("GFS2: wanted %u got %u\n", gl->gl_target, state); pr_err("wanted %u got %u\n", gl->gl_target, state);
GLOCK_BUG_ON(gl, 1); GLOCK_BUG_ON(gl, 1);
} }
spin_unlock(&gl->gl_spin); spin_unlock(&gl->gl_spin);
@ -542,7 +544,7 @@ __acquires(&gl->gl_spin)
/* lock_dlm */ /* lock_dlm */
ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags);
if (ret) { if (ret) {
pr_err("GFS2: lm_lock ret %d\n", ret); pr_err("lm_lock ret %d\n", ret);
GLOCK_BUG_ON(gl, 1); GLOCK_BUG_ON(gl, 1);
} }
} else { /* lock_nolock */ } else { /* lock_nolock */
@ -935,7 +937,7 @@ void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...)
vaf.fmt = fmt; vaf.fmt = fmt;
vaf.va = &args; vaf.va = &args;
pr_err(" %pV", &vaf); pr_err("%pV", &vaf);
} }
va_end(args); va_end(args);

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/dlm.h> #include <linux/dlm.h>
#include <linux/slab.h> #include <linux/slab.h>
@ -176,7 +178,7 @@ static void gdlm_bast(void *arg, int mode)
gfs2_glock_cb(gl, LM_ST_SHARED); gfs2_glock_cb(gl, LM_ST_SHARED);
break; break;
default: default:
pr_err("unknown bast mode %d", mode); pr_err("unknown bast mode %d\n", mode);
BUG(); BUG();
} }
} }
@ -195,7 +197,7 @@ static int make_mode(const unsigned int lmstate)
case LM_ST_SHARED: case LM_ST_SHARED:
return DLM_LOCK_PR; return DLM_LOCK_PR;
} }
pr_err("unknown LM state %d", lmstate); pr_err("unknown LM state %d\n", lmstate);
BUG(); BUG();
return -1; return -1;
} }
@ -308,7 +310,8 @@ static void gdlm_put_lock(struct gfs2_glock *gl)
error = dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_VALBLK, error = dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_VALBLK,
NULL, gl); NULL, gl);
if (error) { if (error) {
pr_err("gdlm_unlock %x,%llx err=%d\n", gl->gl_name.ln_type, pr_err("gdlm_unlock %x,%llx err=%d\n",
gl->gl_name.ln_type,
(unsigned long long)gl->gl_name.ln_number, error); (unsigned long long)gl->gl_name.ln_number, error);
return; return;
} }

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/completion.h> #include <linux/completion.h>

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
@ -150,7 +152,7 @@ static int gfs2_check_sb(struct gfs2_sbd *sdp, int silent)
if (sb->sb_magic != GFS2_MAGIC || if (sb->sb_magic != GFS2_MAGIC ||
sb->sb_type != GFS2_METATYPE_SB) { sb->sb_type != GFS2_METATYPE_SB) {
if (!silent) if (!silent)
pr_warn("GFS2: not a GFS2 filesystem\n"); pr_warn("not a GFS2 filesystem\n");
return -EINVAL; return -EINVAL;
} }
@ -172,7 +174,7 @@ static void end_bio_io_page(struct bio *bio, int error)
if (!error) if (!error)
SetPageUptodate(page); SetPageUptodate(page);
else else
pr_warn("gfs2: error %d reading superblock\n", error); pr_warn("error %d reading superblock\n", error);
unlock_page(page); unlock_page(page);
} }
@ -945,7 +947,7 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
lm = &gfs2_dlm_ops; lm = &gfs2_dlm_ops;
#endif #endif
} else { } else {
pr_info("GFS2: can't find protocol %s\n", proto); pr_info("can't find protocol %s\n", proto);
return -ENOENT; return -ENOENT;
} }
@ -1052,7 +1054,7 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent
sdp = init_sbd(sb); sdp = init_sbd(sb);
if (!sdp) { if (!sdp) {
pr_warn("GFS2: can't alloc struct gfs2_sbd\n"); pr_warn("can't alloc struct gfs2_sbd\n");
return -ENOMEM; return -ENOMEM;
} }
sdp->sd_args = *args; sdp->sd_args = *args;
@ -1300,7 +1302,7 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,
error = gfs2_mount_args(&args, data); error = gfs2_mount_args(&args, data);
if (error) { if (error) {
pr_warn("GFS2: can't parse mount arguments\n"); pr_warn("can't parse mount arguments\n");
goto error_super; goto error_super;
} }
@ -1350,15 +1352,15 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
error = kern_path(dev_name, LOOKUP_FOLLOW, &path); error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
if (error) { if (error) {
pr_warn("GFS2: path_lookup on %s returned error %d\n", pr_warn("path_lookup on %s returned error %d\n",
dev_name, error); dev_name, error);
return ERR_PTR(error); return ERR_PTR(error);
} }
s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags, s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags,
path.dentry->d_inode->i_sb->s_bdev); path.dentry->d_inode->i_sb->s_bdev);
path_put(&path); path_put(&path);
if (IS_ERR(s)) { if (IS_ERR(s)) {
pr_warn("GFS2: gfs2 mount does not exist\n"); pr_warn("gfs2 mount does not exist\n");
return ERR_CAST(s); return ERR_CAST(s);
} }
if ((flags ^ s->s_flags) & MS_RDONLY) { if ((flags ^ s->s_flags) & MS_RDONLY) {

View File

@ -36,6 +36,8 @@
* the quota file, so it is not being constantly read. * the quota file, so it is not being constantly read.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mm.h> #include <linux/mm.h>
@ -1081,10 +1083,10 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
{ {
struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
pr_info("GFS2: fsid=%s: quota %s for %s %u\n", pr_info("fsid=%s: quota %s for %s %u\n",
sdp->sd_fsname, type, sdp->sd_fsname, type,
(qd->qd_id.type == USRQUOTA) ? "user" : "group", (qd->qd_id.type == USRQUOTA) ? "user" : "group",
from_kqid(&init_user_ns, qd->qd_id)); from_kqid(&init_user_ns, qd->qd_id));
return 0; return 0;
} }

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/completion.h> #include <linux/completion.h>
@ -99,12 +101,12 @@ static inline void gfs2_setbit(const struct gfs2_rbm *rbm, bool do_clone,
cur_state = (*byte1 >> bit) & GFS2_BIT_MASK; cur_state = (*byte1 >> bit) & GFS2_BIT_MASK;
if (unlikely(!valid_change[new_state * 4 + cur_state])) { if (unlikely(!valid_change[new_state * 4 + cur_state])) {
pr_warn("GFS2: buf_blk = 0x%x old_state=%d, " pr_warn("buf_blk = 0x%x old_state=%d, new_state=%d\n",
"new_state=%d\n", rbm->offset, cur_state, new_state); rbm->offset, cur_state, new_state);
pr_warn("GFS2: rgrp=0x%llx bi_start=0x%x\n", pr_warn("rgrp=0x%llx bi_start=0x%x\n",
(unsigned long long)rbm->rgd->rd_addr, bi->bi_start); (unsigned long long)rbm->rgd->rd_addr, bi->bi_start);
pr_warn("GFS2: bi_offset=0x%x bi_len=0x%x\n", pr_warn("bi_offset=0x%x bi_len=0x%x\n",
bi->bi_offset, bi->bi_len); bi->bi_offset, bi->bi_len);
dump_stack(); dump_stack();
gfs2_consist_rgrpd(rbm->rgd); gfs2_consist_rgrpd(rbm->rgd);
return; return;
@ -736,11 +738,11 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
static void gfs2_rindex_print(const struct gfs2_rgrpd *rgd) static void gfs2_rindex_print(const struct gfs2_rgrpd *rgd)
{ {
pr_info(" ri_addr = %llu\n", (unsigned long long)rgd->rd_addr); pr_info("ri_addr = %llu\n", (unsigned long long)rgd->rd_addr);
pr_info(" ri_length = %u\n", rgd->rd_length); pr_info("ri_length = %u\n", rgd->rd_length);
pr_info(" ri_data0 = %llu\n", (unsigned long long)rgd->rd_data0); pr_info("ri_data0 = %llu\n", (unsigned long long)rgd->rd_data0);
pr_info(" ri_data = %u\n", rgd->rd_data); pr_info("ri_data = %u\n", rgd->rd_data);
pr_info(" ri_bitbytes = %u\n", rgd->rd_bitbytes); pr_info("ri_bitbytes = %u\n", rgd->rd_bitbytes);
} }
/** /**

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/bio.h> #include <linux/bio.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
@ -175,8 +177,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
break; break;
case Opt_debug: case Opt_debug:
if (args->ar_errors == GFS2_ERRORS_PANIC) { if (args->ar_errors == GFS2_ERRORS_PANIC) {
pr_warn("GFS2: -o debug and -o errors=panic " pr_warn("-o debug and -o errors=panic are mutually exclusive\n");
"are mutually exclusive.\n");
return -EINVAL; return -EINVAL;
} }
args->ar_debug = 1; args->ar_debug = 1;
@ -228,21 +229,21 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
case Opt_commit: case Opt_commit:
rv = match_int(&tmp[0], &args->ar_commit); rv = match_int(&tmp[0], &args->ar_commit);
if (rv || args->ar_commit <= 0) { if (rv || args->ar_commit <= 0) {
pr_warn("GFS2: commit mount option requires a positive numeric argument\n"); pr_warn("commit mount option requires a positive numeric argument\n");
return rv ? rv : -EINVAL; return rv ? rv : -EINVAL;
} }
break; break;
case Opt_statfs_quantum: case Opt_statfs_quantum:
rv = match_int(&tmp[0], &args->ar_statfs_quantum); rv = match_int(&tmp[0], &args->ar_statfs_quantum);
if (rv || args->ar_statfs_quantum < 0) { if (rv || args->ar_statfs_quantum < 0) {
pr_warn("GFS2: statfs_quantum mount option requires a non-negative numeric argument\n"); pr_warn("statfs_quantum mount option requires a non-negative numeric argument\n");
return rv ? rv : -EINVAL; return rv ? rv : -EINVAL;
} }
break; break;
case Opt_quota_quantum: case Opt_quota_quantum:
rv = match_int(&tmp[0], &args->ar_quota_quantum); rv = match_int(&tmp[0], &args->ar_quota_quantum);
if (rv || args->ar_quota_quantum <= 0) { if (rv || args->ar_quota_quantum <= 0) {
pr_warn("GFS2: quota_quantum mount option requires a positive numeric argument\n"); pr_warn("quota_quantum mount option requires a positive numeric argument\n");
return rv ? rv : -EINVAL; return rv ? rv : -EINVAL;
} }
break; break;
@ -259,8 +260,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
break; break;
case Opt_err_panic: case Opt_err_panic:
if (args->ar_debug) { if (args->ar_debug) {
pr_warn("GFS2: -o debug and -o errors=panic " pr_warn("-o debug and -o errors=panic are mutually exclusive\n");
"are mutually exclusive.\n");
return -EINVAL; return -EINVAL;
} }
args->ar_errors = GFS2_ERRORS_PANIC; args->ar_errors = GFS2_ERRORS_PANIC;
@ -279,7 +279,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
break; break;
case Opt_error: case Opt_error:
default: default:
pr_warn("GFS2: invalid mount option: %s\n", o); pr_warn("invalid mount option: %s\n", o);
return -EINVAL; return -EINVAL;
} }
} }

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/completion.h> #include <linux/completion.h>

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
@ -99,13 +101,13 @@ static void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks)
static void gfs2_print_trans(const struct gfs2_trans *tr) static void gfs2_print_trans(const struct gfs2_trans *tr)
{ {
pr_warn("GFS2: Transaction created at: %pSR\n", (void *)tr->tr_ip); pr_warn("Transaction created at: %pSR\n", (void *)tr->tr_ip);
pr_warn("GFS2: blocks=%u revokes=%u reserved=%u touched=%u\n", pr_warn("blocks=%u revokes=%u reserved=%u touched=%u\n",
tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched); tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched);
pr_warn("GFS2: Buf %u/%u Databuf %u/%u Revoke %u/%u\n", pr_warn("Buf %u/%u Databuf %u/%u Revoke %u/%u\n",
tr->tr_num_buf_new, tr->tr_num_buf_rm, tr->tr_num_buf_new, tr->tr_num_buf_rm,
tr->tr_num_databuf_new, tr->tr_num_databuf_rm, tr->tr_num_databuf_new, tr->tr_num_databuf_rm,
tr->tr_num_revoke, tr->tr_num_revoke_rm); tr->tr_num_revoke, tr->tr_num_revoke_rm);
} }
void gfs2_trans_end(struct gfs2_sbd *sdp) 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)
set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
mh = (struct gfs2_meta_header *)bd->bd_bh->b_data; mh = (struct gfs2_meta_header *)bd->bd_bh->b_data;
if (unlikely(mh->mh_magic != cpu_to_be32(GFS2_MAGIC))) { if (unlikely(mh->mh_magic != cpu_to_be32(GFS2_MAGIC))) {
pr_err("Attempting to add uninitialised block to journal " pr_err("Attempting to add uninitialised block to journal (inplace block=%lld)\n",
"(inplace block=%lld)\n",
(unsigned long long)bd->bd_bh->b_blocknr); (unsigned long long)bd->bd_bh->b_blocknr);
BUG(); BUG();
} }

View File

@ -7,6 +7,8 @@
* of the GNU General Public License version 2. * of the GNU General Public License version 2.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
@ -30,7 +32,7 @@ mempool_t *gfs2_page_pool __read_mostly;
void gfs2_assert_i(struct gfs2_sbd *sdp) void gfs2_assert_i(struct gfs2_sbd *sdp)
{ {
pr_emerg("GFS2: fsid=%s: fatal assertion failed\n", sdp->sd_fsname); pr_emerg("fsid=%s: fatal assertion failed\n", sdp->sd_fsname);
} }
int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
@ -65,7 +67,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
} }
if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC) if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC)
panic("GFS2: fsid=%s: panic requested.\n", sdp->sd_fsname); panic("GFS2: fsid=%s: panic requested\n", sdp->sd_fsname);
return -1; return -1;
} }
@ -104,10 +106,8 @@ int gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
return -2; return -2;
if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW) if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW)
pr_warn("GFS2: fsid=%s: warning: assertion \"%s\" failed\n" pr_warn("fsid=%s: warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n",
"GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, assertion, function, file, line);
sdp->sd_fsname, assertion,
sdp->sd_fsname, function, file, line);
if (sdp->sd_args.ar_debug) if (sdp->sd_args.ar_debug)
BUG(); BUG();

View File

@ -10,22 +10,21 @@
#ifndef __UTIL_DOT_H__ #ifndef __UTIL_DOT_H__
#define __UTIL_DOT_H__ #define __UTIL_DOT_H__
#ifdef pr_fmt
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#endif
#include <linux/mempool.h> #include <linux/mempool.h>
#include "incore.h" #include "incore.h"
#define fs_printk(level, fs, fmt, arg...) \ #define fs_warn(fs, fmt, ...) \
printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg) pr_warn("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
#define fs_err(fs, fmt, ...) \
#define fs_info(fs, fmt, arg...) \ pr_err("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
fs_printk(KERN_INFO , fs , fmt , ## arg) #define fs_info(fs, fmt, ...) \
pr_info("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
#define fs_warn(fs, fmt, arg...) \
fs_printk(KERN_WARNING , fs , fmt , ## arg)
#define fs_err(fs, fmt, arg...) \
fs_printk(KERN_ERR, fs , fmt , ## arg)
void gfs2_assert_i(struct gfs2_sbd *sdp); void gfs2_assert_i(struct gfs2_sbd *sdp);
@ -85,7 +84,7 @@ static inline int gfs2_meta_check(struct gfs2_sbd *sdp,
struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data;
u32 magic = be32_to_cpu(mh->mh_magic); u32 magic = be32_to_cpu(mh->mh_magic);
if (unlikely(magic != GFS2_MAGIC)) { if (unlikely(magic != GFS2_MAGIC)) {
printk(KERN_ERR "GFS2: Magic number missing at %llu\n", pr_err("Magic number missing at %llu\n",
(unsigned long long)bh->b_blocknr); (unsigned long long)bh->b_blocknr);
return -EIO; return -EIO;
} }