Whamcloud - gitweb
LU-201 unregister bulk after unregistering reply
authorhongchao.zhang <hongchao.zhang@whamcloud.com>
Wed, 23 Mar 2011 03:05:37 +0000 (11:05 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Apr 2011 17:28:39 +0000 (10:28 -0700)
in ptlrpc_set_wait, the bulk is not unregistered if the reply was unregistered
asynchronously, which will cause "ptlrpc_set_wait" to run into dead loop

Change-Id: Ic79ae29c79be015269bb2b9bb80b5b4dd30be78d
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/413
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/ptlrpc/client.c

index 796d289..39b7824 100644 (file)
@@ -1700,8 +1700,11 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 
                 /* This moves to "unregistering" phase we need to wait for
                  * reply unlink. */
 
                 /* This moves to "unregistering" phase we need to wait for
                  * reply unlink. */
-                if (!unregistered && !ptlrpc_unregister_reply(req, 1))
+                if (!unregistered && !ptlrpc_unregister_reply(req, 1)) {
+                        /* start async bulk unlink too */
+                        ptlrpc_unregister_bulk(req, 1);
                         continue;
                         continue;
+                }
 
                 if (!ptlrpc_unregister_bulk(req, 1))
                         continue;
 
                 if (!ptlrpc_unregister_bulk(req, 1))
                         continue;