gfs2: Get rid of newlines in log messages

Get rid of attempts to create multi-line syslog entries; this only makes
the messages harder to read.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
Andreas Gruenbacher 2024-02-27 20:42:42 +01:00
parent 10398ef57a
commit b204b1b61e
3 changed files with 32 additions and 30 deletions

View File

@ -1827,7 +1827,7 @@ 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)) {
fs_emerg(sdp, "inode %llu, block:%llu, i_h:%u," fs_emerg(sdp, "inode %llu, block:%llu, i_h:%u, "
"s_h:%u, mp_h:%u\n", "s_h:%u, mp_h:%u\n",
(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);

View File

@ -814,11 +814,11 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd)
bi = rgd->rd_bits + (length - 1); bi = rgd->rd_bits + (length - 1);
if ((bi->bi_start + bi->bi_bytes) * GFS2_NBBY != rgd->rd_data) { if ((bi->bi_start + bi->bi_bytes) * GFS2_NBBY != rgd->rd_data) {
gfs2_lm(sdp, gfs2_lm(sdp,
"ri_addr = %llu\n" "ri_addr=%llu "
"ri_length = %u\n" "ri_length=%u "
"ri_data0 = %llu\n" "ri_data0=%llu "
"ri_data = %u\n" "ri_data=%u "
"ri_bitbytes = %u\n" "ri_bitbytes=%u "
"start=%u len=%u offset=%u\n", "start=%u len=%u offset=%u\n",
(unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
rgd->rd_length, rgd->rd_length,

View File

@ -376,8 +376,8 @@ void gfs2_assert_withdraw_i(struct gfs2_sbd *sdp, char *assertion,
return; return;
fs_err(sdp, fs_err(sdp,
"fatal: assertion \"%s\" failed\n" "fatal: assertion \"%s\" failed - "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
assertion, function, file, line); assertion, function, file, line);
/* /*
@ -407,7 +407,8 @@ void gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
return; return;
if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW) if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW)
fs_warn(sdp, "warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n", fs_warn(sdp, "warning: assertion \"%s\" failed - "
"function = %s, file = %s, line = %u\n",
assertion, function, file, line); assertion, function, file, line);
if (sdp->sd_args.ar_debug) if (sdp->sd_args.ar_debug)
@ -416,10 +417,10 @@ void gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
dump_stack(); dump_stack();
if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC) if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC)
panic("GFS2: fsid=%s: warning: assertion \"%s\" failed\n" panic("GFS2: fsid=%s: warning: assertion \"%s\" failed - "
"GFS2: fsid=%s: function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
sdp->sd_fsname, assertion, sdp->sd_fsname, assertion,
sdp->sd_fsname, function, file, line); function, file, line);
sdp->sd_last_warning = jiffies; sdp->sd_last_warning = jiffies;
} }
@ -432,7 +433,8 @@ void gfs2_consist_i(struct gfs2_sbd *sdp, const char *function,
char *file, unsigned int line) char *file, unsigned int line)
{ {
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: filesystem consistency error - function = %s, file = %s, line = %u\n", "fatal: filesystem consistency error - "
"function = %s, file = %s, line = %u\n",
function, file, line); function, file, line);
gfs2_withdraw(sdp); gfs2_withdraw(sdp);
} }
@ -447,9 +449,9 @@ void gfs2_consist_inode_i(struct gfs2_inode *ip,
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: filesystem consistency error\n" "fatal: filesystem consistency error - "
" inode = %llu %llu\n" "inode = %llu %llu, "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
(unsigned long long)ip->i_no_formal_ino, (unsigned long long)ip->i_no_formal_ino,
(unsigned long long)ip->i_no_addr, (unsigned long long)ip->i_no_addr,
function, file, line); function, file, line);
@ -470,9 +472,9 @@ void gfs2_consist_rgrpd_i(struct gfs2_rgrpd *rgd,
sprintf(fs_id_buf, "fsid=%s: ", sdp->sd_fsname); sprintf(fs_id_buf, "fsid=%s: ", sdp->sd_fsname);
gfs2_rgrp_dump(NULL, rgd, fs_id_buf); gfs2_rgrp_dump(NULL, rgd, fs_id_buf);
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: filesystem consistency error\n" "fatal: filesystem consistency error - "
" RG = %llu\n" "RG = %llu, "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
(unsigned long long)rgd->rd_addr, (unsigned long long)rgd->rd_addr,
function, file, line); function, file, line);
gfs2_dump_glock(NULL, rgd->rd_gl, 1); gfs2_dump_glock(NULL, rgd->rd_gl, 1);
@ -492,9 +494,9 @@ int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
int me; int me;
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: invalid metadata block\n" "fatal: invalid metadata block - "
" bh = %llu (%s)\n" "bh = %llu (%s), "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
(unsigned long long)bh->b_blocknr, type, (unsigned long long)bh->b_blocknr, type,
function, file, line); function, file, line);
me = gfs2_withdraw(sdp); me = gfs2_withdraw(sdp);
@ -514,9 +516,9 @@ int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
int me; int me;
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: invalid metadata block\n" "fatal: invalid metadata block - "
" bh = %llu (type: exp=%u, found=%u)\n" "bh = %llu (type: exp=%u, found=%u), "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
(unsigned long long)bh->b_blocknr, type, t, (unsigned long long)bh->b_blocknr, type, t,
function, file, line); function, file, line);
me = gfs2_withdraw(sdp); me = gfs2_withdraw(sdp);
@ -533,8 +535,8 @@ int gfs2_io_error_i(struct gfs2_sbd *sdp, const char *function, char *file,
unsigned int line) unsigned int line)
{ {
gfs2_lm(sdp, gfs2_lm(sdp,
"fatal: I/O error\n" "fatal: I/O error - "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
function, file, line); function, file, line);
return gfs2_withdraw(sdp); return gfs2_withdraw(sdp);
} }
@ -551,9 +553,9 @@ void gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
if (gfs2_withdrawing_or_withdrawn(sdp)) if (gfs2_withdrawing_or_withdrawn(sdp))
return; return;
fs_err(sdp, "fatal: I/O error\n" fs_err(sdp, "fatal: I/O error - "
" block = %llu\n" "block = %llu, "
" function = %s, file = %s, line = %u\n", "function = %s, file = %s, line = %u\n",
(unsigned long long)bh->b_blocknr, function, file, line); (unsigned long long)bh->b_blocknr, function, file, line);
if (withdraw) if (withdraw)
gfs2_withdraw(sdp); gfs2_withdraw(sdp);