Mauricio Faria de Oliveira 45680967ee ocfs2: ratelimit the 'max lookup times reached' notice
Running stress-ng on ocfs2 completely fills the kernel log with 'max
lookup times reached, filesystem may have nested directories.'

Let's ratelimit this message as done with others in the code.

Test-case:

  # mkfs.ocfs2 --mount local $DEV
  # mount $DEV $MNT
  # cd $MNT

  # dmesg -C
  # stress-ng --dirdeep 1 --dirdeep-ops 1000
  # dmesg | grep -c 'max lookup times reached'

Before:

  # dmesg -C
  # stress-ng --dirdeep 1 --dirdeep-ops 1000
  ...
  stress-ng: info:  [11116] successful run completed in 3.03s

  # dmesg | grep -c 'max lookup times reached'
  967

After:

  # dmesg -C
  # stress-ng --dirdeep 1 --dirdeep-ops 1000
  ...
  stress-ng: info:  [739] successful run completed in 0.96s

  # dmesg | grep -c 'max lookup times reached'
  10

  # dmesg
  [  259.086086] ocfs2_check_if_ancestor: 1990 callbacks suppressed
  [  259.086092] (stress-ng-dirde,740,1):ocfs2_check_if_ancestor:1091 max lookup times reached, filesystem may have nested directories, src inode: 18007, dest inode: 17940.
  ...

Link: https://lkml.kernel.org/r/20201001224417.478263-1-mfo@canonical.com
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-12-15 12:13:37 -08:00
..
2020-10-16 11:11:22 -07:00
2020-11-27 12:42:13 -08:00
2020-10-19 14:28:30 -07:00
2020-11-19 22:38:29 -05:00
2020-09-21 08:59:26 -07:00
2020-12-10 16:48:03 -05:00
\n
2020-10-15 14:56:15 -07:00
2020-10-01 11:15:31 +02:00
2020-09-10 14:03:31 -07:00
2020-10-05 10:38:33 -06:00
2020-10-19 14:28:30 -07:00
\n
2020-10-15 15:03:10 -07:00
2020-10-16 12:21:15 -07:00
2020-10-13 12:12:44 -07:00
2020-08-04 21:02:38 -04:00
2020-10-16 11:11:15 -07:00
2020-09-22 23:45:57 -04:00
2020-07-31 08:16:01 +02:00
2020-08-07 11:33:24 -07:00
2020-10-23 11:33:41 -07:00
2020-05-14 16:44:24 +02:00
2020-08-12 10:58:01 -07:00
2020-10-23 11:33:41 -07:00
2020-07-31 08:16:00 +02:00
2020-10-24 12:40:18 -07:00
2019-12-08 14:37:36 +01:00
2020-09-26 22:55:05 -04:00
2020-08-27 16:06:47 -04:00
2020-06-09 15:40:50 -07:00
2020-07-31 08:16:01 +02:00