Commit fb1b3dc4 authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

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: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 992c9ec5
...@@ -655,3 +655,15 @@ __rds_conn_error(struct rds_connection *conn, const char *fmt, ...) ...@@ -655,3 +655,15 @@ __rds_conn_error(struct rds_connection *conn, const char *fmt, ...)
rds_conn_drop(conn); 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);
}
...@@ -669,6 +669,10 @@ void __rds_conn_error(struct rds_connection *conn, const char *, ...); ...@@ -669,6 +669,10 @@ void __rds_conn_error(struct rds_connection *conn, const char *, ...);
#define rds_conn_error(conn, fmt...) \ #define rds_conn_error(conn, fmt...) \
__rds_conn_error(conn, KERN_WARNING "RDS: " 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 static inline int
rds_conn_path_transition(struct rds_conn_path *cp, int old, int new) rds_conn_path_transition(struct rds_conn_path *cp, int old, int new)
{ {
......
...@@ -163,7 +163,8 @@ void rds_connect_worker(struct work_struct *work) ...@@ -163,7 +163,8 @@ void rds_connect_worker(struct work_struct *work)
RDS_CONN_DOWN)) RDS_CONN_DOWN))
rds_queue_reconnect(cp); rds_queue_reconnect(cp);
else else
rds_conn_error(conn, "RDS: connect failed\n"); rds_conn_path_error(cp,
"RDS: connect failed\n");
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment