diff options
author | Zach Brown <zach.brown@oracle.com> | 2010-06-25 17:58:16 -0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:16:33 -0400 |
commit | 8aeb1ba6630ffd44001ae9833842794df0107676 (patch) | |
tree | bc9a78da5281b371d3a9ecb2e00f7c381d9cd33b /net/rds/ib.h | |
parent | 24fa163a4bae74b3378d30e1bc776568cfca8121 (diff) |
RDS/IB: destroy connections on rmmod
IB connections were not being destroyed during rmmod.
First, recently IB device removal callback was changed to disconnect
connections that used the removing device rather than destroying them. So
connections with devices during rmmod were not being destroyed.
Second, rds_ib_destroy_nodev_conns() was being called before connections are
disassociated with devices. It would almost never find connections in the
nodev list.
We first get rid of rds_ib_destroy_conns(), which is no longer called, and
refactor the existing caller into the main body of the function and get rid of
the list and lock wrappers.
Then we call rds_ib_destroy_nodev_conns() *after* ib_unregister_client() has
removed the IB device from all the conns and put the conns on the nodev list.
The result is that IB connections are destroyed by rmmod.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r-- | net/rds/ib.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h index 6265ada08959..e9f9ddf440ca 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h | |||
@@ -299,15 +299,7 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, | |||
299 | int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr); | 299 | int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr); |
300 | void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); | 300 | void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); |
301 | void rds_ib_remove_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); | 301 | void rds_ib_remove_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); |
302 | void __rds_ib_destroy_conns(struct list_head *list, spinlock_t *list_lock); | 302 | void rds_ib_destroy_nodev_conns(void); |
303 | static inline void rds_ib_destroy_nodev_conns(void) | ||
304 | { | ||
305 | __rds_ib_destroy_conns(&ib_nodev_conns, &ib_nodev_conns_lock); | ||
306 | } | ||
307 | static inline void rds_ib_destroy_conns(struct rds_ib_device *rds_ibdev) | ||
308 | { | ||
309 | __rds_ib_destroy_conns(&rds_ibdev->conn_list, &rds_ibdev->spinlock); | ||
310 | } | ||
311 | struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *); | 303 | struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *); |
312 | void rds_ib_get_mr_info(struct rds_ib_device *rds_ibdev, struct rds_info_rdma_connection *iinfo); | 304 | void rds_ib_get_mr_info(struct rds_ib_device *rds_ibdev, struct rds_info_rdma_connection *iinfo); |
313 | void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *); | 305 | void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *); |