diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-02-19 21:04:58 -0500 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:12:04 -0400 |
commit | 940786eb0a0faf3f30898a1cc7c1540d54c1aff6 (patch) | |
tree | a8ca1a5df3154b57cc43380ff529898215c625a3 /net/rds/send.c | |
parent | ee4c7b47e46a9dea789aadb8279c8505f755b3ee (diff) |
RDS: queue failure notifications for dropped atomic ops
When dropping ops in the send queue, we notify the client
of failed rdma ops they asked for notifications on, but not
atomic ops. It should be for both.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r-- | net/rds/send.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index ad89a63c4304..cdca9747fcbc 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -512,9 +512,10 @@ EXPORT_SYMBOL_GPL(rds_atomic_send_complete); | |||
512 | * socket, socket lock) and can just move the notifier. | 512 | * socket, socket lock) and can just move the notifier. |
513 | */ | 513 | */ |
514 | static inline void | 514 | static inline void |
515 | __rds_rdma_send_complete(struct rds_sock *rs, struct rds_message *rm, int status) | 515 | __rds_send_complete(struct rds_sock *rs, struct rds_message *rm, int status) |
516 | { | 516 | { |
517 | struct rm_rdma_op *ro; | 517 | struct rm_rdma_op *ro; |
518 | struct rm_atomic_op *ao; | ||
518 | 519 | ||
519 | ro = &rm->rdma; | 520 | ro = &rm->rdma; |
520 | if (ro->op_active && ro->op_notify && ro->op_notifier) { | 521 | if (ro->op_active && ro->op_notify && ro->op_notifier) { |
@@ -523,6 +524,13 @@ __rds_rdma_send_complete(struct rds_sock *rs, struct rds_message *rm, int status | |||
523 | ro->op_notifier = NULL; | 524 | ro->op_notifier = NULL; |
524 | } | 525 | } |
525 | 526 | ||
527 | ao = &rm->atomic; | ||
528 | if (ao->op_active && ao->op_notify && ao->op_notifier) { | ||
529 | ao->op_notifier->n_status = status; | ||
530 | list_add_tail(&ao->op_notifier->n_list, &rs->rs_notify_queue); | ||
531 | ao->op_notifier = NULL; | ||
532 | } | ||
533 | |||
526 | /* No need to wake the app - caller does this */ | 534 | /* No need to wake the app - caller does this */ |
527 | } | 535 | } |
528 | 536 | ||
@@ -733,7 +741,7 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest) | |||
733 | spin_lock_irqsave(&rm->m_rs_lock, flags); | 741 | spin_lock_irqsave(&rm->m_rs_lock, flags); |
734 | 742 | ||
735 | spin_lock(&rs->rs_lock); | 743 | spin_lock(&rs->rs_lock); |
736 | __rds_rdma_send_complete(rs, rm, RDS_RDMA_CANCELED); | 744 | __rds_send_complete(rs, rm, RDS_RDMA_CANCELED); |
737 | spin_unlock(&rs->rs_lock); | 745 | spin_unlock(&rs->rs_lock); |
738 | 746 | ||
739 | rm->m_rs = NULL; | 747 | rm->m_rs = NULL; |