OSDN Git Service

Revert "f2fs: use printk_ratelimited for f2fs_msg"
authorChao Yu <yuchao0@huawei.com>
Wed, 22 Aug 2018 09:17:47 +0000 (17:17 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 5 Sep 2018 20:41:06 +0000 (13:41 -0700)
Don't limit printing log, so that we will not miss any key messages.

This reverts commit a36c106dffb616250117efb1cab271c19a8f94ff.

In addition, we use printk_ratelimited to avoid too many log prints.
- error injection
- discard submission failure

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c

index 8487006..b3de6c5 100644 (file)
@@ -1306,9 +1306,9 @@ struct f2fs_sb_info {
 };
 
 #ifdef CONFIG_F2FS_FAULT_INJECTION
-#define f2fs_show_injection_info(type)                         \
-       printk("%sF2FS-fs : inject %s in %s of %pF\n",          \
-               KERN_INFO, f2fs_fault_name[type],               \
+#define f2fs_show_injection_info(type)                                 \
+       printk_ratelimited("%sF2FS-fs : inject %s in %s of %pF\n",      \
+               KERN_INFO, f2fs_fault_name[type],                       \
                __func__, __builtin_return_address(0))
 static inline bool time_to_inject(struct f2fs_sb_info *sbi, int type)
 {
index f36a4b7..34e0577 100644 (file)
@@ -905,9 +905,9 @@ static void __remove_discard_cmd(struct f2fs_sb_info *sbi,
                dc->error = 0;
 
        if (dc->error)
-               f2fs_msg(sbi->sb, KERN_INFO,
-                       "Issue discard(%u, %u, %u) failed, ret: %d",
-                       dc->lstart, dc->start, dc->len, dc->error);
+               printk_ratelimited(
+                       "%sF2FS-fs: Issue discard(%u, %u, %u) failed, ret: %d",
+                       KERN_INFO, dc->lstart, dc->start, dc->len, dc->error);
        __detach_discard_cmd(dcc, dc);
 }
 
index 50411fb..18cf1d8 100644 (file)
@@ -207,7 +207,7 @@ void f2fs_msg(struct super_block *sb, const char *level, const char *fmt, ...)
        va_start(args, fmt);
        vaf.fmt = fmt;
        vaf.va = &args;
-       printk_ratelimited("%sF2FS-fs (%s): %pV\n", level, sb->s_id, &vaf);
+       printk("%sF2FS-fs (%s): %pV\n", level, sb->s_id, &vaf);
        va_end(args);
 }