* [PATCH] orangefs: rate limit the client not running info message
@ 2018-09-05 14:54 Colin King
2018-09-07 18:01 ` Mike Marshall
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-09-05 14:54 UTC (permalink / raw)
To: Mike Marshall, Martin Brandenburg, devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently accessing various /sys/fs/orangefs files will spam the
kernel log with the following info message when the client is not
running:
[ 491.489284] sysfs_service_op_show: Client not running :-5:
Rate limit this info message to make it less spammy.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/orangefs/orangefs-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c
index dd28079f518c..19739aaee675 100644
--- a/fs/orangefs/orangefs-sysfs.c
+++ b/fs/orangefs/orangefs-sysfs.c
@@ -323,7 +323,7 @@ static ssize_t sysfs_service_op_show(struct kobject *kobj,
/* Can't do a service_operation if the client is not running... */
rc = is_daemon_in_service();
if (rc) {
- pr_info("%s: Client not running :%d:\n",
+ pr_info_ratelimited("%s: Client not running :%d:\n",
__func__,
is_daemon_in_service());
goto out;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] orangefs: rate limit the client not running info message
2018-09-05 14:54 [PATCH] orangefs: rate limit the client not running info message Colin King
@ 2018-09-07 18:01 ` Mike Marshall
0 siblings, 0 replies; 2+ messages in thread
From: Mike Marshall @ 2018-09-07 18:01 UTC (permalink / raw)
To: colin.king
Cc: Martin Brandenburg, devel, kernel-janitors, LKML, Mike Marshall
Thanks... I've applied your patch to 4.19-rc2 and run it through xfstests.
It is in my linux-next tree now.
I put that in there because I'm really just an old system administrator,
and I would always be happy when I could tail dmesg and see some
hint at why something wasn't doing as I expected.
I just looked in ratelimit.h and at the ratelimit macros in printk.h,
I should try to think about those more when adding sysadmin-alert
messages.
-Mike
On Wed, Sep 5, 2018 at 10:54 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently accessing various /sys/fs/orangefs files will spam the
> kernel log with the following info message when the client is not
> running:
>
> [ 491.489284] sysfs_service_op_show: Client not running :-5:
>
> Rate limit this info message to make it less spammy.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> fs/orangefs/orangefs-sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c
> index dd28079f518c..19739aaee675 100644
> --- a/fs/orangefs/orangefs-sysfs.c
> +++ b/fs/orangefs/orangefs-sysfs.c
> @@ -323,7 +323,7 @@ static ssize_t sysfs_service_op_show(struct kobject *kobj,
> /* Can't do a service_operation if the client is not running... */
> rc = is_daemon_in_service();
> if (rc) {
> - pr_info("%s: Client not running :%d:\n",
> + pr_info_ratelimited("%s: Client not running :%d:\n",
> __func__,
> is_daemon_in_service());
> goto out;
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-07 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 14:54 [PATCH] orangefs: rate limit the client not running info message Colin King
2018-09-07 18:01 ` Mike Marshall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).