Skip to content

Commit

Permalink
RDS: Add rds_conn_path_error()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sowminiv authored and davem330 committed Jun 15, 2016
1 parent 992c9ec commit fb1b3dc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions net/rds/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 4 additions & 0 deletions net/rds/rds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion net/rds/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down

0 comments on commit fb1b3dc

Please sign in to comment.