Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d77d1b58 authored by Joe Perches's avatar Joe Perches Committed by Steven Whitehouse
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent a17d758b
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@
 * but never before the maximum hash table size has been reached.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/buffer_head.h>
@@ -507,8 +509,8 @@ static int gfs2_check_dirent(struct gfs2_dirent *dent, unsigned int offset,
		goto error;
	return 0;
error:
	pr_warn("gfs2_check_dirent: %s (%s)\n", msg,
	       first ? "first in block" : "not first in block");
	pr_warn("%s: %s (%s)\n",
		__func__, msg, first ? "first in block" : "not first in block");
	return -EIO;
}

@@ -531,8 +533,7 @@ static int gfs2_dirent_offset(const void *buf)
	}
	return offset;
wrong_type:
	pr_warn("gfs2_scan_dirent: wrong block type %u\n",
	        be32_to_cpu(h->mh_type));
	pr_warn("%s: wrong block type %u\n", __func__, be32_to_cpu(h->mh_type));
	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);
	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;
	}

@@ -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));
	half_len = len >> 1;
	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);
		error = -EIO;
		goto fail_brelse;
+5 −3
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
 * of the GNU General Public License version 2.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -468,7 +470,7 @@ static void finish_xmote(struct gfs2_glock *gl, unsigned int ret)
			do_xmote(gl, gh, LM_ST_UNLOCKED);
			break;
		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);
		}
		spin_unlock(&gl->gl_spin);
@@ -542,7 +544,7 @@ __acquires(&gl->gl_spin)
		/* lock_dlm */
		ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags);
		if (ret) {
			pr_err("GFS2: lm_lock ret %d\n", ret);
			pr_err("lm_lock ret %d\n", ret);
			GLOCK_BUG_ON(gl, 1);
		}
	} else { /* lock_nolock */
+6 −3
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
 * of the GNU General Public License version 2.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/fs.h>
#include <linux/dlm.h>
#include <linux/slab.h>
@@ -176,7 +178,7 @@ static void gdlm_bast(void *arg, int mode)
		gfs2_glock_cb(gl, LM_ST_SHARED);
		break;
	default:
		pr_err("unknown bast mode %d", mode);
		pr_err("unknown bast mode %d\n", mode);
		BUG();
	}
}
@@ -195,7 +197,7 @@ static int make_mode(const unsigned int lmstate)
	case LM_ST_SHARED:
		return DLM_LOCK_PR;
	}
	pr_err("unknown LM state %d", lmstate);
	pr_err("unknown LM state %d\n", lmstate);
	BUG();
	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,
			   NULL, gl);
	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);
		return;
	}
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
 * of the GNU General Public License version 2.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
+10 −8
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
 * of the GNU General Public License version 2.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/sched.h>
#include <linux/slab.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 ||
	    sb->sb_type != GFS2_METATYPE_SB) {
		if (!silent)
			pr_warn("GFS2: not a GFS2 filesystem\n");
			pr_warn("not a GFS2 filesystem\n");
		return -EINVAL;
	}

@@ -172,7 +174,7 @@ static void end_bio_io_page(struct bio *bio, int error)
	if (!error)
		SetPageUptodate(page);
	else
		pr_warn("gfs2: error %d reading superblock\n", error);
		pr_warn("error %d reading superblock\n", error);
	unlock_page(page);
}

@@ -945,7 +947,7 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
		lm = &gfs2_dlm_ops;
#endif
	} else {
		pr_info("GFS2: can't find protocol %s\n", proto);
		pr_info("can't find protocol %s\n", proto);
		return -ENOENT;
	}

@@ -1052,7 +1054,7 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent

	sdp = init_sbd(sb);
	if (!sdp) {
		pr_warn("GFS2: can't alloc struct gfs2_sbd\n");
		pr_warn("can't alloc struct gfs2_sbd\n");
		return -ENOMEM;
	}
	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);
	if (error) {
		pr_warn("GFS2: can't parse mount arguments\n");
		pr_warn("can't parse mount arguments\n");
		goto error_super;
	}

@@ -1350,7 +1352,7 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,

	error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
	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);
		return ERR_PTR(error);
	}
@@ -1358,7 +1360,7 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
		 path.dentry->d_inode->i_sb->s_bdev);
	path_put(&path);
	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);
	}
	if ((flags ^ s->s_flags) & MS_RDONLY) {
Loading