diff options
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index e19b49b02d1b..c65f87f11de0 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -618,9 +618,8 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, } if (sum->version != dni->version) { - f2fs_msg(sbi->sb, KERN_WARNING, - "%s: valid data with mismatched node version.", - __func__); + f2fs_warn(sbi, "%s: valid data with mismatched node version.", + __func__); set_sbi_flag(sbi, SBI_NEED_FSCK); } @@ -1183,9 +1182,8 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, sum = page_address(sum_page); if (type != GET_SUM_TYPE((&sum->footer))) { - f2fs_msg(sbi->sb, KERN_ERR, "Inconsistent segment (%u) " - "type [%d, %d] in SSA and SIT", - segno, type, GET_SUM_TYPE((&sum->footer))); + f2fs_err(sbi, "Inconsistent segment (%u) type [%d, %d] in SSA and SIT", + segno, type, GET_SUM_TYPE((&sum->footer))); set_sbi_flag(sbi, SBI_NEED_FSCK); f2fs_stop_checkpoint(sbi, false); goto skip; @@ -1397,8 +1395,8 @@ static int free_segment_range(struct f2fs_sb_info *sbi, unsigned int start, next_inuse = find_next_inuse(FREE_I(sbi), end + 1, start); if (next_inuse <= end) { - f2fs_msg(sbi->sb, KERN_ERR, - "segno %u should be free but still inuse!", next_inuse); + f2fs_err(sbi, "segno %u should be free but still inuse!", + next_inuse); f2fs_bug_on(sbi, 1); } return err; @@ -1455,14 +1453,12 @@ int f2fs_resize_fs(struct f2fs_sb_info *sbi, __u64 block_count) return 0; if (is_sbi_flag_set(sbi, SBI_NEED_FSCK)) { - f2fs_msg(sbi->sb, KERN_ERR, - "Should run fsck to repair first."); + f2fs_err(sbi, "Should run fsck to repair first."); return -EINVAL; } if (test_opt(sbi, DISABLE_CHECKPOINT)) { - f2fs_msg(sbi->sb, KERN_ERR, - "Checkpoint should be enabled."); + f2fs_err(sbi, "Checkpoint should be enabled."); return -EINVAL; } @@ -1526,8 +1522,7 @@ int f2fs_resize_fs(struct f2fs_sb_info *sbi, __u64 block_count) out: if (err) { set_sbi_flag(sbi, SBI_NEED_FSCK); - f2fs_msg(sbi->sb, KERN_ERR, - "resize_fs failed, should run fsck to repair!"); + f2fs_err(sbi, "resize_fs failed, should run fsck to repair!"); MAIN_SECS(sbi) += secs; spin_lock(&sbi->stat_lock); |