ext4: remove extraneous newlines from calls to ext4_error() and ext4_warning()
This removes annoying blank syslog entries emitted by ext4_error() or ext4_warning(), since these functions add their own newline. Signed-off-by: Nick Warne <nick@ukfsn.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
fd98496f46
commit
fde4d95ad8
|
@ -100,7 +100,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
|
||||||
* essentially implementing a per-group read-only flag. */
|
* essentially implementing a per-group read-only flag. */
|
||||||
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
|
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
|
||||||
ext4_error(sb, __func__,
|
ext4_error(sb, __func__,
|
||||||
"Checksum bad for group %lu\n", block_group);
|
"Checksum bad for group %lu", block_group);
|
||||||
gdp->bg_free_blocks_count = 0;
|
gdp->bg_free_blocks_count = 0;
|
||||||
gdp->bg_free_inodes_count = 0;
|
gdp->bg_free_inodes_count = 0;
|
||||||
gdp->bg_itable_unused = 0;
|
gdp->bg_itable_unused = 0;
|
||||||
|
|
|
@ -74,7 +74,7 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh,
|
||||||
/* If checksum is bad mark all blocks and inodes use to prevent
|
/* If checksum is bad mark all blocks and inodes use to prevent
|
||||||
* allocation, essentially implementing a per-group read-only flag. */
|
* allocation, essentially implementing a per-group read-only flag. */
|
||||||
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
|
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
|
||||||
ext4_error(sb, __func__, "Checksum bad for group %lu\n",
|
ext4_error(sb, __func__, "Checksum bad for group %lu",
|
||||||
block_group);
|
block_group);
|
||||||
gdp->bg_free_blocks_count = 0;
|
gdp->bg_free_blocks_count = 0;
|
||||||
gdp->bg_free_inodes_count = 0;
|
gdp->bg_free_inodes_count = 0;
|
||||||
|
|
|
@ -447,7 +447,7 @@ static void mb_free_blocks_double(struct inode *inode, struct ext4_buddy *e4b,
|
||||||
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
|
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
|
||||||
|
|
||||||
ext4_error(sb, __func__, "double-free of inode"
|
ext4_error(sb, __func__, "double-free of inode"
|
||||||
" %lu's block %llu(bit %u in group %lu)\n",
|
" %lu's block %llu(bit %u in group %lu)",
|
||||||
inode ? inode->i_ino : 0, blocknr,
|
inode ? inode->i_ino : 0, blocknr,
|
||||||
first + i, e4b->bd_group);
|
first + i, e4b->bd_group);
|
||||||
}
|
}
|
||||||
|
@ -691,7 +691,7 @@ static void ext4_mb_generate_buddy(struct super_block *sb,
|
||||||
|
|
||||||
if (free != grp->bb_free) {
|
if (free != grp->bb_free) {
|
||||||
ext4_error(sb, __func__,
|
ext4_error(sb, __func__,
|
||||||
"EXT4-fs: group %lu: %u blocks in bitmap, %u in gd\n",
|
"EXT4-fs: group %lu: %u blocks in bitmap, %u in gd",
|
||||||
group, free, grp->bb_free);
|
group, free, grp->bb_free);
|
||||||
/*
|
/*
|
||||||
* If we intent to continue, we consider group descritor
|
* If we intent to continue, we consider group descritor
|
||||||
|
@ -1096,7 +1096,7 @@ static void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b,
|
||||||
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
|
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
|
||||||
ext4_unlock_group(sb, e4b->bd_group);
|
ext4_unlock_group(sb, e4b->bd_group);
|
||||||
ext4_error(sb, __func__, "double-free of inode"
|
ext4_error(sb, __func__, "double-free of inode"
|
||||||
" %lu's block %llu(bit %u in group %lu)\n",
|
" %lu's block %llu(bit %u in group %lu)",
|
||||||
inode ? inode->i_ino : 0, blocknr, block,
|
inode ? inode->i_ino : 0, blocknr, block,
|
||||||
e4b->bd_group);
|
e4b->bd_group);
|
||||||
ext4_lock_group(sb, e4b->bd_group);
|
ext4_lock_group(sb, e4b->bd_group);
|
||||||
|
@ -1576,7 +1576,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
|
||||||
* we have free blocks
|
* we have free blocks
|
||||||
*/
|
*/
|
||||||
ext4_error(sb, __func__, "%d free blocks as per "
|
ext4_error(sb, __func__, "%d free blocks as per "
|
||||||
"group info. But bitmap says 0\n",
|
"group info. But bitmap says 0",
|
||||||
free);
|
free);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1585,7 +1585,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
|
||||||
BUG_ON(ex.fe_len <= 0);
|
BUG_ON(ex.fe_len <= 0);
|
||||||
if (free < ex.fe_len) {
|
if (free < ex.fe_len) {
|
||||||
ext4_error(sb, __func__, "%d free blocks as per "
|
ext4_error(sb, __func__, "%d free blocks as per "
|
||||||
"group info. But got %d blocks\n",
|
"group info. But got %d blocks",
|
||||||
free, ex.fe_len);
|
free, ex.fe_len);
|
||||||
/*
|
/*
|
||||||
* The number of free blocks differs. This mostly
|
* The number of free blocks differs. This mostly
|
||||||
|
@ -3629,7 +3629,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
|
||||||
pa, (unsigned long) pa->pa_lstart,
|
pa, (unsigned long) pa->pa_lstart,
|
||||||
(unsigned long) pa->pa_pstart,
|
(unsigned long) pa->pa_pstart,
|
||||||
(unsigned long) pa->pa_len);
|
(unsigned long) pa->pa_len);
|
||||||
ext4_error(sb, __func__, "free %u, pa_free %u\n",
|
ext4_error(sb, __func__, "free %u, pa_free %u",
|
||||||
free, pa->pa_free);
|
free, pa->pa_free);
|
||||||
/*
|
/*
|
||||||
* pa is already deleted so we use the value obtained
|
* pa is already deleted so we use the value obtained
|
||||||
|
@ -3703,14 +3703,14 @@ ext4_mb_discard_group_preallocations(struct super_block *sb,
|
||||||
bitmap_bh = ext4_read_block_bitmap(sb, group);
|
bitmap_bh = ext4_read_block_bitmap(sb, group);
|
||||||
if (bitmap_bh == NULL) {
|
if (bitmap_bh == NULL) {
|
||||||
ext4_error(sb, __func__, "Error in reading block "
|
ext4_error(sb, __func__, "Error in reading block "
|
||||||
"bitmap for %lu\n", group);
|
"bitmap for %lu", group);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ext4_mb_load_buddy(sb, group, &e4b);
|
err = ext4_mb_load_buddy(sb, group, &e4b);
|
||||||
if (err) {
|
if (err) {
|
||||||
ext4_error(sb, __func__, "Error in loading buddy "
|
ext4_error(sb, __func__, "Error in loading buddy "
|
||||||
"information for %lu\n", group);
|
"information for %lu", group);
|
||||||
put_bh(bitmap_bh);
|
put_bh(bitmap_bh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3877,14 +3877,14 @@ repeat:
|
||||||
err = ext4_mb_load_buddy(sb, group, &e4b);
|
err = ext4_mb_load_buddy(sb, group, &e4b);
|
||||||
if (err) {
|
if (err) {
|
||||||
ext4_error(sb, __func__, "Error in loading buddy "
|
ext4_error(sb, __func__, "Error in loading buddy "
|
||||||
"information for %lu\n", group);
|
"information for %lu", group);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitmap_bh = ext4_read_block_bitmap(sb, group);
|
bitmap_bh = ext4_read_block_bitmap(sb, group);
|
||||||
if (bitmap_bh == NULL) {
|
if (bitmap_bh == NULL) {
|
||||||
ext4_error(sb, __func__, "Error in reading block "
|
ext4_error(sb, __func__, "Error in reading block "
|
||||||
"bitmap for %lu\n", group);
|
"bitmap for %lu", group);
|
||||||
ext4_mb_release_desc(&e4b);
|
ext4_mb_release_desc(&e4b);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -4149,7 +4149,7 @@ ext4_mb_discard_lg_preallocations(struct super_block *sb,
|
||||||
ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL);
|
ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL);
|
||||||
if (ext4_mb_load_buddy(sb, group, &e4b)) {
|
if (ext4_mb_load_buddy(sb, group, &e4b)) {
|
||||||
ext4_error(sb, __func__, "Error in loading buddy "
|
ext4_error(sb, __func__, "Error in loading buddy "
|
||||||
"information for %lu\n", group);
|
"information for %lu", group);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ext4_lock_group(sb, group);
|
ext4_lock_group(sb, group);
|
||||||
|
@ -4446,7 +4446,7 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
|
||||||
else {
|
else {
|
||||||
ext4_unlock_group(sb, group);
|
ext4_unlock_group(sb, group);
|
||||||
ext4_error(sb, __func__,
|
ext4_error(sb, __func__,
|
||||||
"Double free of blocks %d (%d %d)\n",
|
"Double free of blocks %d (%d %d)",
|
||||||
block, entry->start_blk, entry->count);
|
block, entry->start_blk, entry->count);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -762,13 +762,13 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
|
||||||
|
|
||||||
if (ext4_blocks_count(es) + input->blocks_count <
|
if (ext4_blocks_count(es) + input->blocks_count <
|
||||||
ext4_blocks_count(es)) {
|
ext4_blocks_count(es)) {
|
||||||
ext4_warning(sb, __func__, "blocks_count overflow\n");
|
ext4_warning(sb, __func__, "blocks_count overflow");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (le32_to_cpu(es->s_inodes_count) + EXT4_INODES_PER_GROUP(sb) <
|
if (le32_to_cpu(es->s_inodes_count) + EXT4_INODES_PER_GROUP(sb) <
|
||||||
le32_to_cpu(es->s_inodes_count)) {
|
le32_to_cpu(es->s_inodes_count)) {
|
||||||
ext4_warning(sb, __func__, "inodes_count overflow\n");
|
ext4_warning(sb, __func__, "inodes_count overflow");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -999,8 +999,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
|
||||||
" too large to resize to %llu blocks safely\n",
|
" too large to resize to %llu blocks safely\n",
|
||||||
sb->s_id, n_blocks_count);
|
sb->s_id, n_blocks_count);
|
||||||
if (sizeof(sector_t) < 8)
|
if (sizeof(sector_t) < 8)
|
||||||
ext4_warning(sb, __func__,
|
ext4_warning(sb, __func__, "CONFIG_LBD not enabled");
|
||||||
"CONFIG_LBD not enabled\n");
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ set_qf_format:
|
||||||
EXT4_FEATURE_INCOMPAT_EXTENTS)) {
|
EXT4_FEATURE_INCOMPAT_EXTENTS)) {
|
||||||
ext4_warning(sb, __func__,
|
ext4_warning(sb, __func__,
|
||||||
"extents feature not enabled "
|
"extents feature not enabled "
|
||||||
"on this filesystem, use tune2fs\n");
|
"on this filesystem, use tune2fs");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
set_opt(sbi->s_mount_opt, EXTENTS);
|
set_opt(sbi->s_mount_opt, EXTENTS);
|
||||||
|
@ -1993,7 +1993,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
else
|
else
|
||||||
ext4_warning(sb, __func__,
|
ext4_warning(sb, __func__,
|
||||||
"extents feature not enabled on this filesystem, "
|
"extents feature not enabled on this filesystem, "
|
||||||
"use tune2fs.\n");
|
"use tune2fs.");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enable delayed allocation by default
|
* enable delayed allocation by default
|
||||||
|
|
Loading…
Reference in New Issue