Skip to content

Commit d6e7ac6

Browse files
loemrawkdave
authored andcommitted
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 <[email protected]> Signed-off-by: Leo Martins <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 41fd1e9 commit d6e7ac6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/btrfs/messages.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt,
239239
vaf.fmt = fmt;
240240
vaf.va = &args;
241241

242-
if (__ratelimit(ratelimit)) {
242+
/* Do not ratelimit if CONFIG_BTRFS_DEBUG is enabled. */
243+
if (IS_ENABLED(CONFIG_BTRFS_DEBUG) || __ratelimit(ratelimit)) {
243244
if (fs_info) {
244245
char statestr[STATE_STRING_BUF_LEN];
245246

0 commit comments

Comments
 (0)