[PATCH 10/28] lnet: o2iblnd: clean up zombie connections on shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Serguei Smirnov <ssmirnov@xxxxxxxxxxxxx>

Clean up zombie connections on net shutdown in o2iblnd
Wake up connd threads and wait for them to do the clean-up
before proceeding.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14503
Lustre-commit: 2a183829cdcc7008f ("LU-14503 o2iblnd: clean up zombie connections on shutdown")
Signed-off-by: Serguei Smirnov <ssmirnov@xxxxxxxxxxxxx>
Reviewed-on: https://review.whamcloud.com/42068
Reviewed-by: Cyril Bordage <cbordage@xxxxxxxxxxxxx>
Reviewed-by: Chris Horn <chris.horn@xxxxxxx>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@xxxxxxx>
Reviewed-by: Oleg Drokin <green@xxxxxxxxxxxxx>
Signed-off-by: James Simmons <jsimmons@xxxxxxxxxxxxx>
---
 net/lnet/klnds/o2iblnd/o2iblnd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/lnet/klnds/o2iblnd/o2iblnd.c b/net/lnet/klnds/o2iblnd/o2iblnd.c
index 8dce4179..65bc89b 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/net/lnet/klnds/o2iblnd/o2iblnd.c
@@ -2609,6 +2609,12 @@ static void kiblnd_shutdown(struct lnet_ni *ni)
 		list_del(&net->ibn_list);
 		write_unlock_irqrestore(g_lock, flags);
 
+		wake_up_all(&kiblnd_data.kib_connd_waitq);
+		wait_var_event_warning(&net->ibn_nconns,
+				       atomic_read(&net->ibn_nconns) == 0,
+				       "%s: waiting for %d conns to clean\n",
+				       libcfs_nidstr(&ni->ni_nid),
+				       atomic_read(&net->ibn_nconns));
 		/* fall through */
 
 	case IBLND_INIT_NOTHING:
-- 
1.8.3.1




[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux