diff options
Diffstat (limited to 'net/rds/send.c')
-rw-r--r-- | net/rds/send.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 817997daf785..19dfd025498e 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -166,7 +166,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
166 | rm = conn->c_xmit_rm; | 166 | rm = conn->c_xmit_rm; |
167 | if (rm && | 167 | if (rm && |
168 | conn->c_xmit_hdr_off == sizeof(struct rds_header) && | 168 | conn->c_xmit_hdr_off == sizeof(struct rds_header) && |
169 | conn->c_xmit_sg == rm->m_nents) { | 169 | conn->c_xmit_sg == rm->data.m_nents) { |
170 | conn->c_xmit_rm = NULL; | 170 | conn->c_xmit_rm = NULL; |
171 | conn->c_xmit_sg = 0; | 171 | conn->c_xmit_sg = 0; |
172 | conn->c_xmit_hdr_off = 0; | 172 | conn->c_xmit_hdr_off = 0; |
@@ -236,7 +236,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
236 | * connection. | 236 | * connection. |
237 | * Therefore, we never retransmit messages with RDMA ops. | 237 | * Therefore, we never retransmit messages with RDMA ops. |
238 | */ | 238 | */ |
239 | if (rm->m_rdma_op && | 239 | if (rm->rdma.m_rdma_op && |
240 | test_bit(RDS_MSG_RETRANSMITTED, &rm->m_flags)) { | 240 | test_bit(RDS_MSG_RETRANSMITTED, &rm->m_flags)) { |
241 | spin_lock_irqsave(&conn->c_lock, flags); | 241 | spin_lock_irqsave(&conn->c_lock, flags); |
242 | if (test_and_clear_bit(RDS_MSG_ON_CONN, &rm->m_flags)) | 242 | if (test_and_clear_bit(RDS_MSG_ON_CONN, &rm->m_flags)) |
@@ -268,8 +268,8 @@ int rds_send_xmit(struct rds_connection *conn) | |||
268 | * keep this simple and require that the transport either | 268 | * keep this simple and require that the transport either |
269 | * send the whole rdma or none of it. | 269 | * send the whole rdma or none of it. |
270 | */ | 270 | */ |
271 | if (rm->m_rdma_op && !conn->c_xmit_rdma_sent) { | 271 | if (rm->rdma.m_rdma_op && !conn->c_xmit_rdma_sent) { |
272 | ret = conn->c_trans->xmit_rdma(conn, rm->m_rdma_op); | 272 | ret = conn->c_trans->xmit_rdma(conn, rm->rdma.m_rdma_op); |
273 | if (ret) | 273 | if (ret) |
274 | break; | 274 | break; |
275 | conn->c_xmit_rdma_sent = 1; | 275 | conn->c_xmit_rdma_sent = 1; |
@@ -279,7 +279,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | if (conn->c_xmit_hdr_off < sizeof(struct rds_header) || | 281 | if (conn->c_xmit_hdr_off < sizeof(struct rds_header) || |
282 | conn->c_xmit_sg < rm->m_nents) { | 282 | conn->c_xmit_sg < rm->data.m_nents) { |
283 | ret = conn->c_trans->xmit(conn, rm, | 283 | ret = conn->c_trans->xmit(conn, rm, |
284 | conn->c_xmit_hdr_off, | 284 | conn->c_xmit_hdr_off, |
285 | conn->c_xmit_sg, | 285 | conn->c_xmit_sg, |
@@ -295,7 +295,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
295 | ret -= tmp; | 295 | ret -= tmp; |
296 | } | 296 | } |
297 | 297 | ||
298 | sg = &rm->m_sg[conn->c_xmit_sg]; | 298 | sg = &rm->data.m_sg[conn->c_xmit_sg]; |
299 | while (ret) { | 299 | while (ret) { |
300 | tmp = min_t(int, ret, sg->length - | 300 | tmp = min_t(int, ret, sg->length - |
301 | conn->c_xmit_data_off); | 301 | conn->c_xmit_data_off); |
@@ -306,7 +306,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
306 | sg++; | 306 | sg++; |
307 | conn->c_xmit_sg++; | 307 | conn->c_xmit_sg++; |
308 | BUG_ON(ret != 0 && | 308 | BUG_ON(ret != 0 && |
309 | conn->c_xmit_sg == rm->m_nents); | 309 | conn->c_xmit_sg == rm->data.m_nents); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | } | 312 | } |
@@ -419,7 +419,7 @@ void rds_rdma_send_complete(struct rds_message *rm, int status) | |||
419 | 419 | ||
420 | spin_lock_irqsave(&rm->m_rs_lock, flags); | 420 | spin_lock_irqsave(&rm->m_rs_lock, flags); |
421 | 421 | ||
422 | ro = rm->m_rdma_op; | 422 | ro = rm->rdma.m_rdma_op; |
423 | if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) && | 423 | if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) && |
424 | ro && ro->r_notify && ro->r_notifier) { | 424 | ro && ro->r_notify && ro->r_notifier) { |
425 | notifier = ro->r_notifier; | 425 | notifier = ro->r_notifier; |
@@ -453,7 +453,7 @@ __rds_rdma_send_complete(struct rds_sock *rs, struct rds_message *rm, int status | |||
453 | { | 453 | { |
454 | struct rds_rdma_op *ro; | 454 | struct rds_rdma_op *ro; |
455 | 455 | ||
456 | ro = rm->m_rdma_op; | 456 | ro = rm->rdma.m_rdma_op; |
457 | if (ro && ro->r_notify && ro->r_notifier) { | 457 | if (ro && ro->r_notify && ro->r_notifier) { |
458 | ro->r_notifier->n_status = status; | 458 | ro->r_notifier->n_status = status; |
459 | list_add_tail(&ro->r_notifier->n_list, &rs->rs_notify_queue); | 459 | list_add_tail(&ro->r_notifier->n_list, &rs->rs_notify_queue); |
@@ -477,7 +477,7 @@ struct rds_message *rds_send_get_message(struct rds_connection *conn, | |||
477 | spin_lock_irqsave(&conn->c_lock, flags); | 477 | spin_lock_irqsave(&conn->c_lock, flags); |
478 | 478 | ||
479 | list_for_each_entry_safe(rm, tmp, &conn->c_retrans, m_conn_item) { | 479 | list_for_each_entry_safe(rm, tmp, &conn->c_retrans, m_conn_item) { |
480 | if (rm->m_rdma_op == op) { | 480 | if (rm->rdma.m_rdma_op == op) { |
481 | atomic_inc(&rm->m_refcount); | 481 | atomic_inc(&rm->m_refcount); |
482 | found = rm; | 482 | found = rm; |
483 | goto out; | 483 | goto out; |
@@ -485,7 +485,7 @@ struct rds_message *rds_send_get_message(struct rds_connection *conn, | |||
485 | } | 485 | } |
486 | 486 | ||
487 | list_for_each_entry_safe(rm, tmp, &conn->c_send_queue, m_conn_item) { | 487 | list_for_each_entry_safe(rm, tmp, &conn->c_send_queue, m_conn_item) { |
488 | if (rm->m_rdma_op == op) { | 488 | if (rm->rdma.m_rdma_op == op) { |
489 | atomic_inc(&rm->m_refcount); | 489 | atomic_inc(&rm->m_refcount); |
490 | found = rm; | 490 | found = rm; |
491 | break; | 491 | break; |
@@ -545,7 +545,7 @@ void rds_send_remove_from_sock(struct list_head *messages, int status) | |||
545 | spin_lock(&rs->rs_lock); | 545 | spin_lock(&rs->rs_lock); |
546 | 546 | ||
547 | if (test_and_clear_bit(RDS_MSG_ON_SOCK, &rm->m_flags)) { | 547 | if (test_and_clear_bit(RDS_MSG_ON_SOCK, &rm->m_flags)) { |
548 | struct rds_rdma_op *ro = rm->m_rdma_op; | 548 | struct rds_rdma_op *ro = rm->rdma.m_rdma_op; |
549 | struct rds_notifier *notifier; | 549 | struct rds_notifier *notifier; |
550 | 550 | ||
551 | list_del_init(&rm->m_sock_item); | 551 | list_del_init(&rm->m_sock_item); |
@@ -557,7 +557,7 @@ void rds_send_remove_from_sock(struct list_head *messages, int status) | |||
557 | &rs->rs_notify_queue); | 557 | &rs->rs_notify_queue); |
558 | if (!notifier->n_status) | 558 | if (!notifier->n_status) |
559 | notifier->n_status = status; | 559 | notifier->n_status = status; |
560 | rm->m_rdma_op->r_notifier = NULL; | 560 | rm->rdma.m_rdma_op->r_notifier = NULL; |
561 | } | 561 | } |
562 | was_on_sock = 1; | 562 | was_on_sock = 1; |
563 | rm->m_rs = NULL; | 563 | rm->m_rs = NULL; |
@@ -874,11 +874,11 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, | |||
874 | if (ret) | 874 | if (ret) |
875 | goto out; | 875 | goto out; |
876 | 876 | ||
877 | if ((rm->m_rdma_cookie || rm->m_rdma_op) && | 877 | if ((rm->m_rdma_cookie || rm->rdma.m_rdma_op) && |
878 | !conn->c_trans->xmit_rdma) { | 878 | !conn->c_trans->xmit_rdma) { |
879 | if (printk_ratelimit()) | 879 | if (printk_ratelimit()) |
880 | printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", | 880 | printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", |
881 | rm->m_rdma_op, conn->c_trans->xmit_rdma); | 881 | rm->rdma.m_rdma_op, conn->c_trans->xmit_rdma); |
882 | ret = -EOPNOTSUPP; | 882 | ret = -EOPNOTSUPP; |
883 | goto out; | 883 | goto out; |
884 | } | 884 | } |