From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 02/16] fs: dlm: add dlm macros for ratelimit log
Date: Fri, 21 May 2021 15:08:34 -0400 [thread overview]
Message-ID: <20210521190848.350176-3-aahringo@redhat.com> (raw)
In-Reply-To: <20210521190848.350176-1-aahringo@redhat.com>
This patch add ratelimit macro to dlm subsystem and will set the
connecting log message to ratelimit. In non blocking connecting cases it
will print out this message a lot.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/dlm_internal.h | 2 ++
fs/dlm/lowcomms.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 04fe9f525ac7..ae3fdf6d9cda 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -60,6 +60,8 @@ struct dlm_mhandle;
#define log_print(fmt, args...) \
printk(KERN_ERR "dlm: "fmt"\n" , ##args)
+#define log_print_ratelimited(fmt, args...) \
+ printk_ratelimited(KERN_ERR "dlm: "fmt"\n", ##args)
#define log_error(ls, fmt, args...) \
printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 166e36fcf3e4..15810701b13e 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1075,7 +1075,7 @@ static void sctp_connect_to_sock(struct connection *con)
make_sockaddr(&daddr, dlm_config.ci_tcp_port, &addr_len);
- log_print("connecting to %d", con->nodeid);
+ log_print_ratelimited("connecting to %d", con->nodeid);
/* Turn off Nagle's algorithm */
sctp_sock_set_nodelay(sock->sk);
@@ -1171,7 +1171,7 @@ static void tcp_connect_to_sock(struct connection *con)
make_sockaddr(&saddr, dlm_config.ci_tcp_port, &addr_len);
- log_print("connecting to %d", con->nodeid);
+ log_print_ratelimited("connecting to %d", con->nodeid);
/* Turn off Nagle's algorithm */
tcp_sock_set_nodelay(sock->sk);
--
2.26.3
next prev parent reply other threads:[~2021-05-21 19:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 19:08 [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 00/16] fs: dlm: introduce dlm re-transmission layer Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 01/16] fs: dlm: always run complete for possible waiters Alexander Aring
2021-05-21 19:08 ` Alexander Aring [this message]
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 03/16] fs: dlm: fix srcu read lock usage Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 04/16] fs: dlm: set is othercon flag Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 05/16] fs: dlm: reconnect if socket error report occurs Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 06/16] fs: dlm: cancel work sync othercon Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 07/16] fs: dlm: fix connection tcp EOF handling Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 08/16] fs: dlm: public header in out utility Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 09/16] fs: dlm: add more midcomms hooks Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 10/16] fs: dlm: make buffer handling per msg Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 11/16] fs: dlm: add functionality to re-transmit a message Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 12/16] fs: dlm: move out some hash functionality Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 13/16] fs: dlm: add union in dlm header for lockspace id Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 14/16] fs: dlm: add reliable connection if reconnect Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 15/16] fs: dlm: add midcomms debugfs functionality Alexander Aring
2021-05-21 19:08 ` [Cluster-devel] [PATCHv6 v5.13-rc1 dlm/next 16/16] fs: dlm: don't allow half transmitted messages Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210521190848.350176-3-aahringo@redhat.com \
--to=aahringo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).