gfs2: Get rid of newlines in log messages
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 27 Feb 2024 19:42:42 +0000 (20:42 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 9 Apr 2024 16:35:57 +0000 (18:35 +0200)
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>
fs/gfs2/bmap.c
fs/gfs2/rgrp.c
fs/gfs2/util.c

index 643175498d1c3b53c2df2d994503ce07305a9fa1..b8d64f2259d6a1b5a207ef82c170853c8e2bc394 100644 (file)
@@ -1827,7 +1827,7 @@ 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)) {
-                               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",
                                       (unsigned long long)ip->i_no_addr,
                                       prev_bnr, ip->i_height, strip_h, mp_h);
index 26d6c1eea559190afa2a8e7a8553195129691e7c..29c772816765266b420b24e9903424c96e3ed0ce 100644 (file)
@@ -814,11 +814,11 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd)
        bi = rgd->rd_bits + (length - 1);
        if ((bi->bi_start + bi->bi_bytes) * GFS2_NBBY != rgd->rd_data) {
                gfs2_lm(sdp,
-                       "ri_addr = %llu\n"
-                       "ri_length = %u\n"
-                       "ri_data0 = %llu\n"
-                       "ri_data = %u\n"
-                       "ri_bitbytes = %u\n"
+                       "ri_addr=%llu "
+                       "ri_length=%u "
+                       "ri_data0=%llu "
+                       "ri_data=%u "
+                       "ri_bitbytes=%u "
                        "start=%u len=%u offset=%u\n",
                        (unsigned long long)rgd->rd_addr,
                        rgd->rd_length,
index f52141ce948533607c9a2af2914df2279331269b..fd65a2e3410214f27626e47f070f61dcd991323a 100644 (file)
@@ -376,8 +376,8 @@ void gfs2_assert_withdraw_i(struct gfs2_sbd *sdp, char *assertion,
                return;
 
        fs_err(sdp,
-              "fatal: assertion \"%s\" failed\n"
-              "   function = %s, file = %s, line = %u\n",
+              "fatal: assertion \"%s\" failed - "
+              "function = %s, file = %s, line = %u\n",
               assertion, function, file, line);
 
        /*
@@ -407,7 +407,8 @@ void gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
                return;
 
        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);
 
        if (sdp->sd_args.ar_debug)
@@ -416,10 +417,10 @@ void gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
                dump_stack();
 
        if (sdp->sd_args.ar_errors == GFS2_ERRORS_PANIC)
-               panic("GFS2: fsid=%s: warning: assertion \"%s\" failed\n"
-                     "GFS2: fsid=%s:   function = %s, file = %s, line = %u\n",
+               panic("GFS2: fsid=%s: warning: assertion \"%s\" failed - "
+                     "function = %s, file = %s, line = %u\n",
                      sdp->sd_fsname, assertion,
-                     sdp->sd_fsname, function, file, line);
+                     function, file, line);
 
        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)
 {
        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);
        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);
 
        gfs2_lm(sdp,
-               "fatal: filesystem consistency error\n"
-               "  inode = %llu %llu\n"
-               "  function = %s, file = %s, line = %u\n",
+               "fatal: filesystem consistency error - "
+               "inode = %llu %llu, "
+               "function = %s, file = %s, line = %u\n",
                (unsigned long long)ip->i_no_formal_ino,
                (unsigned long long)ip->i_no_addr,
                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);
        gfs2_rgrp_dump(NULL, rgd, fs_id_buf);
        gfs2_lm(sdp,
-               "fatal: filesystem consistency error\n"
-               "  RG = %llu\n"
-               "  function = %s, file = %s, line = %u\n",
+               "fatal: filesystem consistency error - "
+               "RG = %llu, "
+               "function = %s, file = %s, line = %u\n",
                (unsigned long long)rgd->rd_addr,
                function, file, line);
        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;
 
        gfs2_lm(sdp,
-               "fatal: invalid metadata block\n"
-               "  bh = %llu (%s)\n"
-               "  function = %s, file = %s, line = %u\n",
+               "fatal: invalid metadata block - "
+               "bh = %llu (%s), "
+               "function = %s, file = %s, line = %u\n",
                (unsigned long long)bh->b_blocknr, type,
                function, file, line);
        me = gfs2_withdraw(sdp);
@@ -514,9 +516,9 @@ int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
        int me;
 
        gfs2_lm(sdp,
-               "fatal: invalid metadata block\n"
-               "  bh = %llu (type: exp=%u, found=%u)\n"
-               "  function = %s, file = %s, line = %u\n",
+               "fatal: invalid metadata block - "
+               "bh = %llu (type: exp=%u, found=%u), "
+               "function = %s, file = %s, line = %u\n",
                (unsigned long long)bh->b_blocknr, type, t,
                function, file, line);
        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)
 {
        gfs2_lm(sdp,
-               "fatal: I/O error\n"
-               "  function = %s, file = %s, line = %u\n",
+               "fatal: I/O error - "
+               "function = %s, file = %s, line = %u\n",
                function, file, line);
        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))
                return;
 
-       fs_err(sdp, "fatal: I/O error\n"
-              "  block = %llu\n"
-              "  function = %s, file = %s, line = %u\n",
+       fs_err(sdp, "fatal: I/O error - "
+              "block = %llu, "
+              "function = %s, file = %s, line = %u\n",
               (unsigned long long)bh->b_blocknr, function, file, line);
        if (withdraw)
                gfs2_withdraw(sdp);