Whamcloud - gitweb
LU-8624 osc: hung in osc_destroy() 88/22588/4
authorAndriy Skulysh <andriy.skulysh@seagate.com>
Mon, 19 Sep 2016 10:25:47 +0000 (13:25 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 16 Mar 2017 21:38:28 +0000 (21:38 +0000)
cl_destroy_in_flight becomes < 0 because the
osc_can_send_destroy() won't increment
cl_destroy_in_flight if l_wait_event() gets
interrupted by a signal, but the request will
still be sent and the request's interpret
function will decrease the counter.

Don't send OST_DESTROY request on signal
and return -EINTR.

Seagate-bug-id: MRP-3834
Change-Id: Ie725e501909095b8cd853287b9a43feb1f89ddb5
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: https://review.whamcloud.com/22588
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osc/osc_request.c

index a92a135..9f541e5 100644 (file)
@@ -647,8 +647,12 @@ static int osc_destroy(const struct lu_env *env, struct obd_export *exp,
                 * Wait until the number of on-going destroy RPCs drops
                 * under max_rpc_in_flight
                 */
-               l_wait_event_exclusive(cli->cl_destroy_waitq,
-                                      osc_can_send_destroy(cli), &lwi);
+               rc = l_wait_event_exclusive(cli->cl_destroy_waitq,
+                                           osc_can_send_destroy(cli), &lwi);
+               if (rc) {
+                       ptlrpc_request_free(req);
+                       RETURN(rc);
+               }
        }
 
        /* Do not wait for response */