Whamcloud - gitweb
imp_lock should be held while iterating over imp_sending_list for
authorshadow <shadow>
Fri, 15 Jun 2007 14:11:34 +0000 (14:11 +0000)
committershadow <shadow>
Fri, 15 Jun 2007 14:11:34 +0000 (14:11 +0000)
prevent destroy request after get timeout in ptlrpc_queue_wait.

b=11674
i=green
i=wangdi

lustre/ChangeLog
lustre/ptlrpc/recover.c

index b4f5bba..50f6155 100644 (file)
@@ -298,6 +298,12 @@ Details    : brw_stats were being printed as log2 but all of them were not
              recorded as log2. Also remove some code duplication arising from
              filter_tally_{read,write}.
 
+Severity   : normal
+Bugzilla   : 11674
+Frequency  : rare, only in recovery.
+Description: ASSERTION(req->rq_type != LI_POISON) failed
+Details    : imp_lock should be held while iterating over imp_sending_list for
+             prevent destroy request after get timeout in ptlrpc_queue_wait.
 
 --------------------------------------------------------------------------------
 
index 94c0d78..cc9448c 100644 (file)
@@ -150,7 +150,6 @@ int ptlrpc_resend(struct obd_import *imp)
                 spin_unlock(&imp->imp_lock);
                 RETURN(-1);
         }
-        spin_unlock(&imp->imp_lock);
 
         list_for_each_entry_safe(req, next, &imp->imp_sending_list, rq_list) {
                 LASSERTF((long)req > CFS_PAGE_SIZE && req != LP_POISON,
@@ -159,6 +158,7 @@ int ptlrpc_resend(struct obd_import *imp)
                 if (!req->rq_no_resend)
                         ptlrpc_resend_req(req);
         }
+        spin_unlock(&imp->imp_lock);
 
         RETURN(0);
 }