orangefs: rate limit the client not running info message

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>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
Colin Ian King 2018-09-05 15:54:01 +01:00 committed by Mike Marshall
parent 052d12766b
commit 2978d87347
1 changed files with 1 additions and 1 deletions

View File

@ -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... */ /* Can't do a service_operation if the client is not running... */
rc = is_daemon_in_service(); rc = is_daemon_in_service();
if (rc) { if (rc) {
pr_info("%s: Client not running :%d:\n", pr_info_ratelimited("%s: Client not running :%d:\n",
__func__, __func__,
is_daemon_in_service()); is_daemon_in_service());
goto out; goto out;