]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
[PATCH] RDS: When RDS socket is closed, print unreleased MR's
authorRama Nichanamatlu <rama.nichanamatlu@oracle.com>
Tue, 27 Jun 2017 12:22:46 +0000 (05:22 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 6 Jul 2017 03:04:28 +0000 (20:04 -0700)
Improves diagnosability when the requester RDMA operation fails with
remote access error. This commit prints RDMA credentials which are
prematurely purged by owning process.

Signed-off-by: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
Reviewed-by: Avinash Repaka <avinash.repaka@oracle.com>
Reviewed-by: Hakon Bugge <haakon.bugge@oracle.com>
Orabug: 26276427

net/rds/rdma.c

index 37b99465ab77bea19ade0a1ad35adffad69a873a..e874c076e896b81f97ec1b7c19b565f8959cce2d 100644 (file)
@@ -130,8 +130,10 @@ void rds_rdma_drop_keys(struct rds_sock *rs)
        struct rds_mr *mr;
        struct rb_node *node;
        unsigned long flags;
+       char name[TASK_COMM_LEN];
 
        /* Release any MRs associated with this socket */
+       get_task_comm(name, current);
        spin_lock_irqsave(&rs->rs_rdma_lock, flags);
        while ((node = rb_first(&rs->rs_rdma_keys))) {
                mr = container_of(node, struct rds_mr, r_rb_node);
@@ -140,6 +142,10 @@ void rds_rdma_drop_keys(struct rds_sock *rs)
                rb_erase(&mr->r_rb_node, &rs->rs_rdma_keys);
                RB_CLEAR_NODE(&mr->r_rb_node);
                spin_unlock_irqrestore(&rs->rs_rdma_lock, flags);
+               trace_printk("RDS: %s pid %d sk closed. Active MR key: %#x %s %s\n",
+                            name, current->pid, mr->r_key,
+                            mr->r_use_once ? ",use once" : "",
+                            mr->r_invalidate ? ",invalidate" : "");
                rds_destroy_mr(mr);
                rds_mr_put(mr);
                spin_lock_irqsave(&rs->rs_rdma_lock, flags);