summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2016-06-13 19:44:39 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-15 09:50:43 +0300
commitfb1b3dc43dabd4bf7b57b3d63fd2875a499c81f0 (patch)
tree2784d9fbc250048373c7ee4de50d683a1fafc87c /net
parent992c9ec5fe1d0c7859e158ee22f293cbee95c6a3 (diff)
downloadlinux-fb1b3dc43dabd4bf7b57b3d63fd2875a499c81f0.tar.xz
RDS: Add rds_conn_path_error()
rds_conn_path_error() is the MP-aware analog of rds_conn_error, to be used by multipath-capable callers. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rds/connection.c12
-rw-r--r--net/rds/rds.h4
-rw-r--r--net/rds/threads.c3
3 files changed, 18 insertions, 1 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 9e0b489aea41..57556e615ce2 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -655,3 +655,15 @@ __rds_conn_error(struct rds_connection *conn, const char *fmt, ...)
rds_conn_drop(conn);
}
+
+void
+__rds_conn_path_error(struct rds_conn_path *cp, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vprintk(fmt, ap);
+ va_end(ap);
+
+ rds_conn_path_drop(cp);
+}
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 74fcf5a28723..85f98bd88c1c 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -669,6 +669,10 @@ void __rds_conn_error(struct rds_connection *conn, const char *, ...);
#define rds_conn_error(conn, fmt...) \
__rds_conn_error(conn, KERN_WARNING "RDS: " fmt)
+void __rds_conn_path_error(struct rds_conn_path *cp, const char *, ...);
+#define rds_conn_path_error(cp, fmt...) \
+ __rds_conn_path_error(cp, KERN_WARNING "RDS: " fmt)
+
static inline int
rds_conn_path_transition(struct rds_conn_path *cp, int old, int new)
{
diff --git a/net/rds/threads.c b/net/rds/threads.c
index 50d26576dee7..94cca66ba5d6 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -163,7 +163,8 @@ void rds_connect_worker(struct work_struct *work)
RDS_CONN_DOWN))
rds_queue_reconnect(cp);
else
- rds_conn_error(conn, "RDS: connect failed\n");
+ rds_conn_path_error(cp,
+ "RDS: connect failed\n");
}
}
}