btrfs: drop newlines from strings when using btrfs_* helpers
authorDavid Sterba <dsterba@suse.com>
Thu, 13 Jul 2017 13:32:18 +0000 (15:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 16 Aug 2017 14:12:02 +0000 (16:12 +0200)
The helpers append "\n" so we can keep the actual strings shorter. The
extra newline will print an empty line.  Some messages have been
slightly modified to be more consistent with the rest (lowercase first
letter).

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/qgroup.c
fs/btrfs/scrub.c

index 4fe93c43630201985c10e0b7f00292d20b41db5f..fd2fee398c836c154e444e4be92f6e82cf3bcfff 100644 (file)
@@ -6832,7 +6832,7 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
                if (ret) {
                        const char *errstr = btrfs_decode_error(ret);
                        btrfs_warn(fs_info,
-                                  "Discard failed while removing blockgroup: errno=%d %s\n",
+                          "discard failed while removing blockgroup: errno=%d %s",
                                   ret, errstr);
                }
        }
index c5e6180cdb8c9250e3a525e311a42795c4831c32..cdc9f4015ec36c08688a81bb1ba2bf657a9845ef 100644 (file)
@@ -709,7 +709,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode,
 
        if (!BTRFS_I(inode)->generation) {
                btrfs_info(fs_info,
-                          "The free space cache file (%llu) is invalid. skip it\n",
+                          "the free space cache file (%llu) is invalid, skip it",
                           offset);
                return 0;
        }
index 97970602c3d55908e47c6b031c1bdcbd527659d9..3bf7bae36e56b900e445a7b58d8f98eacec459fe 100644 (file)
@@ -8017,7 +8017,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
        bio_set_op_attrs(bio, REQ_OP_READ, read_mode);
 
        btrfs_debug(BTRFS_I(inode)->root->fs_info,
-                   "Repair DIO Read Error: submitting new dio read[%#x] to this_mirror=%d, in_validation=%d\n",
+                   "repair DIO read error: submitting new dio read[%#x] to this_mirror=%d, in_validation=%d",
                    read_mode, failrec->this_mirror, failrec->in_validation);
 
        ret = submit_dio_repair_bio(inode, bio, failrec->this_mirror);
index acb48983be26a838040960920c830c160ba88eb4..ddc37c537058a72828179d8845f6d0ee3150877e 100644 (file)
@@ -2646,7 +2646,7 @@ out:
        if (IS_ERR(trans)) {
                err = PTR_ERR(trans);
                btrfs_err(fs_info,
-                         "fail to start transaction for status update: %d\n",
+                         "fail to start transaction for status update: %d",
                          err);
                goto done;
        }
index 6f1e4c984b94a5ed479530bc606ba8d9653bff9a..de53c521a50f53eea60d47f26031119d745ac421 100644 (file)
@@ -3869,8 +3869,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
                        ro_set = 0;
                } else {
                        btrfs_warn(fs_info,
-                                  "failed setting block group ro, ret=%d\n",
-                                  ret);
+                                  "failed setting block group ro: %d", ret);
                        btrfs_put_block_group(cache);
                        break;
                }