Skip to content

Commit

Permalink
btrfs: drop newlines from strings when using btrfs_* helpers
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Aug 16, 2017
1 parent b6e6bca commit 913e153
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,7 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work)
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;
}
Expand Down
3 changes: 1 addition & 2 deletions fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 913e153

Please sign in to comment.