Message ID | a0c406abae81f2824ed822ef7f5e85650d8424b1.1727219806.git.loemra.dev@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: disable rate limiting when debug enabled | expand |
在 2024/9/25 09:12, Leo Martins 写道: > 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(). > > Signed-off-by: Leo Martins <loemra.dev@gmail.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > fs/btrfs/messages.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/btrfs/messages.c b/fs/btrfs/messages.c > index 77752eec125d9..363fd28c02688 100644 > --- a/fs/btrfs/messages.c > +++ b/fs/btrfs/messages.c > @@ -239,7 +239,8 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, > vaf.fmt = fmt; > vaf.va = &args; > > - if (__ratelimit(ratelimit)) { > + /* Do not ratelimit if CONFIG_BTRFS_DEBUG is enabled. */ > + if (IS_ENABLED(CONFIG_BTRFS_DEBUG) || __ratelimit(ratelimit)) { > if (fs_info) { > char statestr[STATE_STRING_BUF_LEN]; >
On Tue, Sep 24, 2024 at 04:42:29PM -0700, Leo Martins wrote: > 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(). > > Signed-off-by: Leo Martins <loemra.dev@gmail.com> Added to for-next, thanks.
diff --git a/fs/btrfs/messages.c b/fs/btrfs/messages.c index 77752eec125d9..363fd28c02688 100644 --- a/fs/btrfs/messages.c +++ b/fs/btrfs/messages.c @@ -239,7 +239,8 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, vaf.fmt = fmt; vaf.va = &args; - if (__ratelimit(ratelimit)) { + /* Do not ratelimit if CONFIG_BTRFS_DEBUG is enabled. */ + if (IS_ENABLED(CONFIG_BTRFS_DEBUG) || __ratelimit(ratelimit)) { if (fs_info) { char statestr[STATE_STRING_BUF_LEN];
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(). Signed-off-by: Leo Martins <loemra.dev@gmail.com> --- fs/btrfs/messages.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)