forked from Minki/linux
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: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
3792ce973f
commit
f29e62eed2
@ -1862,9 +1862,8 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length)
|
||||
gfs2_assert_withdraw(sdp, bh);
|
||||
if (gfs2_assert_withdraw(sdp,
|
||||
prev_bnr != bh->b_blocknr)) {
|
||||
printk(KERN_EMERG "GFS2: fsid=%s:inode %llu, "
|
||||
"block:%llu, i_h:%u, s_h:%u, mp_h:%u\n",
|
||||
sdp->sd_fsname,
|
||||
fs_emerg(sdp, "inode %llu, block:%llu, i_h:%u,"
|
||||
"s_h:%u, mp_h:%u\n",
|
||||
(unsigned long long)ip->i_no_addr,
|
||||
prev_bnr, ip->i_height, strip_h, mp_h);
|
||||
}
|
||||
|
@ -506,7 +506,8 @@ static void freeze_go_sync(struct gfs2_glock *gl)
|
||||
atomic_set(&sdp->sd_freeze_state, SFS_STARTING_FREEZE);
|
||||
error = freeze_super(sdp->sd_vfs);
|
||||
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);
|
||||
}
|
||||
queue_work(gfs2_freeze_wq, &sdp->sd_freeze_work);
|
||||
|
@ -1112,32 +1112,33 @@ static int gfs2_rgrp_lvb_valid(struct gfs2_rgrpd *rgd)
|
||||
{
|
||||
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_sbd *sdp = rgd->rd_sbd;
|
||||
int valid = 1;
|
||||
|
||||
if (rgl->rl_flags != str->rg_flags) {
|
||||
printk(KERN_WARNING "GFS2: rgd: %llu lvb flag mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
fs_warn(sdp, "GFS2: rgd: %llu lvb flag mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
be32_to_cpu(rgl->rl_flags), be32_to_cpu(str->rg_flags));
|
||||
valid = 0;
|
||||
}
|
||||
if (rgl->rl_free != str->rg_free) {
|
||||
printk(KERN_WARNING "GFS2: rgd: %llu lvb free mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
be32_to_cpu(rgl->rl_free), be32_to_cpu(str->rg_free));
|
||||
fs_warn(sdp, "GFS2: rgd: %llu lvb free mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
be32_to_cpu(rgl->rl_free), be32_to_cpu(str->rg_free));
|
||||
valid = 0;
|
||||
}
|
||||
if (rgl->rl_dinodes != str->rg_dinodes) {
|
||||
printk(KERN_WARNING "GFS2: rgd: %llu lvb dinode mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
be32_to_cpu(rgl->rl_dinodes),
|
||||
be32_to_cpu(str->rg_dinodes));
|
||||
fs_warn(sdp, "GFS2: rgd: %llu lvb dinode mismatch %u/%u",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
be32_to_cpu(rgl->rl_dinodes),
|
||||
be32_to_cpu(str->rg_dinodes));
|
||||
valid = 0;
|
||||
}
|
||||
if (rgl->rl_igeneration != str->rg_igeneration) {
|
||||
printk(KERN_WARNING "GFS2: rgd: %llu lvb igen mismatch "
|
||||
"%llu/%llu", (unsigned long long)rgd->rd_addr,
|
||||
(unsigned long long)be64_to_cpu(rgl->rl_igeneration),
|
||||
(unsigned long long)be64_to_cpu(str->rg_igeneration));
|
||||
fs_warn(sdp, "GFS2: rgd: %llu lvb igen mismatch %llu/%llu",
|
||||
(unsigned long long)rgd->rd_addr,
|
||||
(unsigned long long)be64_to_cpu(rgl->rl_igeneration),
|
||||
(unsigned long long)be64_to_cpu(str->rg_igeneration));
|
||||
valid = 0;
|
||||
}
|
||||
return valid;
|
||||
|
@ -978,14 +978,14 @@ void gfs2_freeze_func(struct work_struct *work)
|
||||
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, 0,
|
||||
&freeze_gh);
|
||||
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);
|
||||
} else {
|
||||
atomic_set(&sdp->sd_freeze_state, SFS_UNFROZEN);
|
||||
error = thaw_super(sb);
|
||||
if (error) {
|
||||
printk(KERN_INFO "GFS2: couldn't thaw filesystem: %d\n",
|
||||
error);
|
||||
fs_info(sdp, "GFS2: couldn't thaw filesystem: %d\n",
|
||||
error);
|
||||
gfs2_assert_withdraw(sdp, 0);
|
||||
}
|
||||
if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags))
|
||||
|
Loading…
Reference in New Issue
Block a user