diff options
author | Joe Perches <joe@perches.com> | 2019-06-18 11:48:42 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-07-03 00:40:40 +0200 |
commit | dcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d (patch) | |
tree | b725d2166c9325de23807cc204abc7c153813aa4 /fs/f2fs/segment.h | |
parent | f2fs: avoid get_valid_blocks() for cleanup (diff) | |
download | linux-dcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d.tar.xz linux-dcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d.zip |
f2fs: introduce f2fs_<level> macros to wrap f2fs_printk()
- Add and use f2fs_<level> macros
- Convert f2fs_msg to f2fs_printk
- Remove level from f2fs_printk and embed the level in the format
- Coalesce formats and align multi-line arguments
- Remove unnecessary duplicate extern f2fs_msg f2fs.h
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 429007b8036e..166ac0f07a4e 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -693,9 +693,8 @@ static inline int check_block_count(struct f2fs_sb_info *sbi, } while (cur_pos < sbi->blocks_per_seg); if (unlikely(GET_SIT_VBLOCKS(raw_sit) != valid_blocks)) { - f2fs_msg(sbi->sb, KERN_ERR, - "Mismatch valid blocks %d vs. %d", - GET_SIT_VBLOCKS(raw_sit), valid_blocks); + f2fs_err(sbi, "Mismatch valid blocks %d vs. %d", + GET_SIT_VBLOCKS(raw_sit), valid_blocks); set_sbi_flag(sbi, SBI_NEED_FSCK); return -EINVAL; } @@ -703,9 +702,8 @@ static inline int check_block_count(struct f2fs_sb_info *sbi, /* check segment usage, and check boundary of a given segment number */ if (unlikely(GET_SIT_VBLOCKS(raw_sit) > sbi->blocks_per_seg || segno > TOTAL_SEGS(sbi) - 1)) { - f2fs_msg(sbi->sb, KERN_ERR, - "Wrong valid blocks %d or segno %u", - GET_SIT_VBLOCKS(raw_sit), segno); + f2fs_err(sbi, "Wrong valid blocks %d or segno %u", + GET_SIT_VBLOCKS(raw_sit), segno); set_sbi_flag(sbi, SBI_NEED_FSCK); return -EINVAL; } |