Commit 833dcd35 authored by Joe Perches's avatar Joe Perches Committed by Jaegeuk Kim

f2fs: logging neatening

Update the logging uses that have unnecessary newlines as the f2fs_printk
function and so its f2fs_<level> macro callers already adds one.

This allows searching single line logging entries with an easier grep and
also avoids unnecessary blank lines in the logging.

Miscellanea:

o Coalesce formats
o Align to open parenthesis
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent c6140415
...@@ -3833,7 +3833,7 @@ static int f2fs_is_file_aligned(struct inode *inode) ...@@ -3833,7 +3833,7 @@ static int f2fs_is_file_aligned(struct inode *inode)
/* hole */ /* hole */
if (!(map.m_flags & F2FS_MAP_FLAGS)) { if (!(map.m_flags & F2FS_MAP_FLAGS)) {
f2fs_err(sbi, "Swapfile has holes\n"); f2fs_err(sbi, "Swapfile has holes");
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
...@@ -3854,9 +3854,8 @@ static int f2fs_is_file_aligned(struct inode *inode) ...@@ -3854,9 +3854,8 @@ static int f2fs_is_file_aligned(struct inode *inode)
cur_lblock += nr_pblocks; cur_lblock += nr_pblocks;
} }
if (not_aligned) if (not_aligned)
f2fs_warn(sbi, "Swapfile (%u) is not align to section: \n" f2fs_warn(sbi, "Swapfile (%u) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate()",
"\t1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate()", not_aligned);
not_aligned);
out: out:
return ret; return ret;
} }
...@@ -3904,7 +3903,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, ...@@ -3904,7 +3903,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis,
/* hole */ /* hole */
if (!(map.m_flags & F2FS_MAP_FLAGS)) { if (!(map.m_flags & F2FS_MAP_FLAGS)) {
f2fs_err(sbi, "Swapfile has holes\n"); f2fs_err(sbi, "Swapfile has holes");
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -3950,9 +3949,8 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, ...@@ -3950,9 +3949,8 @@ static int check_swap_activate_fast(struct swap_info_struct *sis,
sis->highest_bit = cur_lblock - 1; sis->highest_bit = cur_lblock - 1;
if (not_aligned) if (not_aligned)
f2fs_warn(sbi, "Swapfile (%u) is not align to section: \n" f2fs_warn(sbi, "Swapfile (%u) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate()",
"\t1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate()", not_aligned);
not_aligned);
out: out:
return ret; return ret;
} }
...@@ -4060,7 +4058,7 @@ static int check_swap_activate(struct swap_info_struct *sis, ...@@ -4060,7 +4058,7 @@ static int check_swap_activate(struct swap_info_struct *sis,
out: out:
return ret; return ret;
bad_bmap: bad_bmap:
f2fs_err(sbi, "Swapfile has holes\n"); f2fs_err(sbi, "Swapfile has holes");
return -EINVAL; return -EINVAL;
} }
......
...@@ -3235,7 +3235,7 @@ static int f2fs_ioc_enable_verity(struct file *filp, unsigned long arg) ...@@ -3235,7 +3235,7 @@ static int f2fs_ioc_enable_verity(struct file *filp, unsigned long arg)
if (!f2fs_sb_has_verity(F2FS_I_SB(inode))) { if (!f2fs_sb_has_verity(F2FS_I_SB(inode))) {
f2fs_warn(F2FS_I_SB(inode), f2fs_warn(F2FS_I_SB(inode),
"Can't enable fs-verity on inode %lu: the verity feature is not enabled on this filesystem.\n", "Can't enable fs-verity on inode %lu: the verity feature is not enabled on this filesystem",
inode->i_ino); inode->i_ino);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -4019,9 +4019,8 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg) ...@@ -4019,9 +4019,8 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg)
LLONG_MAX); LLONG_MAX);
if (ret) if (ret)
f2fs_warn(sbi, "%s: The file might be partially decompressed " f2fs_warn(sbi, "%s: The file might be partially decompressed (errno=%d). Please delete the file.",
"(errno=%d). Please delete the file.\n", __func__, ret);
__func__, ret);
out: out:
inode_unlock(inode); inode_unlock(inode);
file_end_write(filp); file_end_write(filp);
...@@ -4093,9 +4092,8 @@ static int f2fs_ioc_compress_file(struct file *filp, unsigned long arg) ...@@ -4093,9 +4092,8 @@ static int f2fs_ioc_compress_file(struct file *filp, unsigned long arg)
clear_inode_flag(inode, FI_ENABLE_COMPRESS); clear_inode_flag(inode, FI_ENABLE_COMPRESS);
if (ret) if (ret)
f2fs_warn(sbi, "%s: The file might be partially compressed " f2fs_warn(sbi, "%s: The file might be partially compressed (errno=%d). Please delete the file.",
"(errno=%d). Please delete the file.\n", __func__, ret);
__func__, ret);
out: out:
inode_unlock(inode); inode_unlock(inode);
file_end_write(filp); file_end_write(filp);
......
...@@ -1031,8 +1031,8 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, ...@@ -1031,8 +1031,8 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
if (unlikely(check_valid_map(sbi, segno, offset))) { if (unlikely(check_valid_map(sbi, segno, offset))) {
if (!test_and_set_bit(segno, SIT_I(sbi)->invalid_segmap)) { if (!test_and_set_bit(segno, SIT_I(sbi)->invalid_segmap)) {
f2fs_err(sbi, "mismatched blkaddr %u (source_blkaddr %u) in seg %u\n", f2fs_err(sbi, "mismatched blkaddr %u (source_blkaddr %u) in seg %u",
blkaddr, source_blkaddr, segno); blkaddr, source_blkaddr, segno);
f2fs_bug_on(sbi, 1); f2fs_bug_on(sbi, 1);
} }
} }
......
...@@ -3920,7 +3920,7 @@ static int restore_curseg_summaries(struct f2fs_sb_info *sbi) ...@@ -3920,7 +3920,7 @@ static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
/* sanity check for summary blocks */ /* sanity check for summary blocks */
if (nats_in_cursum(nat_j) > NAT_JOURNAL_ENTRIES || if (nats_in_cursum(nat_j) > NAT_JOURNAL_ENTRIES ||
sits_in_cursum(sit_j) > SIT_JOURNAL_ENTRIES) { sits_in_cursum(sit_j) > SIT_JOURNAL_ENTRIES) {
f2fs_err(sbi, "invalid journal entries nats %u sits %u\n", f2fs_err(sbi, "invalid journal entries nats %u sits %u",
nats_in_cursum(nat_j), sits_in_cursum(sit_j)); nats_in_cursum(nat_j), sits_in_cursum(sit_j));
return -EINVAL; return -EINVAL;
} }
......
...@@ -1153,7 +1153,7 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) ...@@ -1153,7 +1153,7 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
} }
if (test_opt(sbi, DISABLE_CHECKPOINT) && f2fs_lfs_mode(sbi)) { if (test_opt(sbi, DISABLE_CHECKPOINT) && f2fs_lfs_mode(sbi)) {
f2fs_err(sbi, "LFS not compatible with checkpoint=disable\n"); f2fs_err(sbi, "LFS not compatible with checkpoint=disable");
return -EINVAL; return -EINVAL;
} }
...@@ -3555,7 +3555,7 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi) ...@@ -3555,7 +3555,7 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
#ifdef CONFIG_BLK_DEV_ZONED #ifdef CONFIG_BLK_DEV_ZONED
if (bdev_zoned_model(FDEV(i).bdev) == BLK_ZONED_HM && if (bdev_zoned_model(FDEV(i).bdev) == BLK_ZONED_HM &&
!f2fs_sb_has_blkzoned(sbi)) { !f2fs_sb_has_blkzoned(sbi)) {
f2fs_err(sbi, "Zoned block device feature not enabled\n"); f2fs_err(sbi, "Zoned block device feature not enabled");
return -EINVAL; return -EINVAL;
} }
if (bdev_zoned_model(FDEV(i).bdev) != BLK_ZONED_NONE) { if (bdev_zoned_model(FDEV(i).bdev) != BLK_ZONED_NONE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment