Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: disable rate limiting when debug enabled

Disable ratelimiting for btrfs_printk when CONFIG_BTRFS_DEBUG is
enabled. This allows for more verbose output which is often needed by
functions like btrfs_dump_space_info().

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Leo Martins <loemra.dev@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Leo Martins and committed by
David Sterba
d6e7ac65 41fd1e94

+2 -1
+2 -1
fs/btrfs/messages.c
··· 239 239 vaf.fmt = fmt; 240 240 vaf.va = &args; 241 241 242 - if (__ratelimit(ratelimit)) { 242 + /* Do not ratelimit if CONFIG_BTRFS_DEBUG is enabled. */ 243 + if (IS_ENABLED(CONFIG_BTRFS_DEBUG) || __ratelimit(ratelimit)) { 243 244 if (fs_info) { 244 245 char statestr[STATE_STRING_BUF_LEN]; 245 246