Commit f29e62ee authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

gfs2: replace more printk with calls to fs_info and friends

This patch replaces a few leftover printk errors with calls to
fs_info and similar, so that the file system having the error is
properly logged.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 3792ce97
...@@ -1862,9 +1862,8 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length) ...@@ -1862,9 +1862,8 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length)
gfs2_assert_withdraw(sdp, bh); gfs2_assert_withdraw(sdp, bh);
if (gfs2_assert_withdraw(sdp, if (gfs2_assert_withdraw(sdp,
prev_bnr != bh->b_blocknr)) { prev_bnr != bh->b_blocknr)) {
printk(KERN_EMERG "GFS2: fsid=%s:inode %llu, " fs_emerg(sdp, "inode %llu, block:%llu, i_h:%u,"
"block:%llu, i_h:%u, s_h:%u, mp_h:%u\n", "s_h:%u, mp_h:%u\n",
sdp->sd_fsname,
(unsigned long long)ip->i_no_addr, (unsigned long long)ip->i_no_addr,
prev_bnr, ip->i_height, strip_h, mp_h); prev_bnr, ip->i_height, strip_h, mp_h);
} }
......
...@@ -506,7 +506,8 @@ static void freeze_go_sync(struct gfs2_glock *gl) ...@@ -506,7 +506,8 @@ static void freeze_go_sync(struct gfs2_glock *gl)
atomic_set(&sdp->sd_freeze_state, SFS_STARTING_FREEZE); atomic_set(&sdp->sd_freeze_state, SFS_STARTING_FREEZE);
error = freeze_super(sdp->sd_vfs); error = freeze_super(sdp->sd_vfs);
if (error) { if (error) {
printk(KERN_INFO "GFS2: couldn't freeze filesystem: %d\n", error); fs_info(sdp, "GFS2: couldn't freeze filesystem: %d\n",
error);
gfs2_assert_withdraw(sdp, 0); gfs2_assert_withdraw(sdp, 0);
} }
queue_work(gfs2_freeze_wq, &sdp->sd_freeze_work); queue_work(gfs2_freeze_wq, &sdp->sd_freeze_work);
......
...@@ -1112,30 +1112,31 @@ static int gfs2_rgrp_lvb_valid(struct gfs2_rgrpd *rgd) ...@@ -1112,30 +1112,31 @@ static int gfs2_rgrp_lvb_valid(struct gfs2_rgrpd *rgd)
{ {
struct gfs2_rgrp_lvb *rgl = rgd->rd_rgl; struct gfs2_rgrp_lvb *rgl = rgd->rd_rgl;
struct gfs2_rgrp *str = (struct gfs2_rgrp *)rgd->rd_bits[0].bi_bh->b_data; struct gfs2_rgrp *str = (struct gfs2_rgrp *)rgd->rd_bits[0].bi_bh->b_data;
struct gfs2_sbd *sdp = rgd->rd_sbd;
int valid = 1; int valid = 1;
if (rgl->rl_flags != str->rg_flags) { if (rgl->rl_flags != str->rg_flags) {
printk(KERN_WARNING "GFS2: rgd: %llu lvb flag mismatch %u/%u", fs_warn(sdp, "GFS2: rgd: %llu lvb flag mismatch %u/%u",
(unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
be32_to_cpu(rgl->rl_flags), be32_to_cpu(str->rg_flags)); be32_to_cpu(rgl->rl_flags), be32_to_cpu(str->rg_flags));
valid = 0; valid = 0;
} }
if (rgl->rl_free != str->rg_free) { if (rgl->rl_free != str->rg_free) {
printk(KERN_WARNING "GFS2: rgd: %llu lvb free mismatch %u/%u", fs_warn(sdp, "GFS2: rgd: %llu lvb free mismatch %u/%u",
(unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
be32_to_cpu(rgl->rl_free), be32_to_cpu(str->rg_free)); be32_to_cpu(rgl->rl_free), be32_to_cpu(str->rg_free));
valid = 0; valid = 0;
} }
if (rgl->rl_dinodes != str->rg_dinodes) { if (rgl->rl_dinodes != str->rg_dinodes) {
printk(KERN_WARNING "GFS2: rgd: %llu lvb dinode mismatch %u/%u", fs_warn(sdp, "GFS2: rgd: %llu lvb dinode mismatch %u/%u",
(unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
be32_to_cpu(rgl->rl_dinodes), be32_to_cpu(rgl->rl_dinodes),
be32_to_cpu(str->rg_dinodes)); be32_to_cpu(str->rg_dinodes));
valid = 0; valid = 0;
} }
if (rgl->rl_igeneration != str->rg_igeneration) { if (rgl->rl_igeneration != str->rg_igeneration) {
printk(KERN_WARNING "GFS2: rgd: %llu lvb igen mismatch " fs_warn(sdp, "GFS2: rgd: %llu lvb igen mismatch %llu/%llu",
"%llu/%llu", (unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
(unsigned long long)be64_to_cpu(rgl->rl_igeneration), (unsigned long long)be64_to_cpu(rgl->rl_igeneration),
(unsigned long long)be64_to_cpu(str->rg_igeneration)); (unsigned long long)be64_to_cpu(str->rg_igeneration));
valid = 0; valid = 0;
......
...@@ -978,13 +978,13 @@ void gfs2_freeze_func(struct work_struct *work) ...@@ -978,13 +978,13 @@ void gfs2_freeze_func(struct work_struct *work)
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, 0, error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, 0,
&freeze_gh); &freeze_gh);
if (error) { if (error) {
printk(KERN_INFO "GFS2: couldn't get freeze lock : %d\n", error); fs_info(sdp, "GFS2: couldn't get freeze lock : %d\n", error);
gfs2_assert_withdraw(sdp, 0); gfs2_assert_withdraw(sdp, 0);
} else { } else {
atomic_set(&sdp->sd_freeze_state, SFS_UNFROZEN); atomic_set(&sdp->sd_freeze_state, SFS_UNFROZEN);
error = thaw_super(sb); error = thaw_super(sb);
if (error) { if (error) {
printk(KERN_INFO "GFS2: couldn't thaw filesystem: %d\n", fs_info(sdp, "GFS2: couldn't thaw filesystem: %d\n",
error); error);
gfs2_assert_withdraw(sdp, 0); gfs2_assert_withdraw(sdp, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment