From patchwork Tue May 4 03:37:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Anderson X-Patchwork-Id: 96657 X-Patchwork-Delegate: snitzer@redhat.com Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o443fK5P022266 for ; Tue, 4 May 2010 03:41:58 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o443dKaA028923; Mon, 3 May 2010 23:39:20 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o443c1ie019559 for ; Mon, 3 May 2010 23:38:01 -0400 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.6]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o443buZD008842 for ; Mon, 3 May 2010 23:37:56 -0400 Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.144]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o443bmLQ016100 for ; Mon, 3 May 2010 23:37:48 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e4.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o443PTLW014940 for ; Mon, 3 May 2010 23:25:29 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o443bmEO164238 for ; Mon, 3 May 2010 23:37:48 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o443blNr019103 for ; Mon, 3 May 2010 23:37:47 -0400 Received: from localhost.localdomain (sig-9-65-236-129.mts.ibm.com [9.65.236.129]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o443bWsI018712; Mon, 3 May 2010 23:37:46 -0400 From: Mike Anderson To: linux-scsi@vger.kernel.org Date: Mon, 3 May 2010 20:37:06 -0700 Message-Id: <1272944228-30511-8-git-send-email-andmike@linux.vnet.ibm.com> In-Reply-To: <1272944228-30511-1-git-send-email-andmike@linux.vnet.ibm.com> References: <1272944228-30511-1-git-send-email-andmike@linux.vnet.ibm.com> X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.6 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, James Bottomley , Jens Axobe Subject: [dm-devel] [PATCH 7/9] blk: Mark requests aborted X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 03:41:58 +0000 (UTC) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index ad45b44..d8610c1 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -229,9 +229,17 @@ void blk_abort_queue(struct request_queue *q) */ list_splice_init(&q->timeout_list, &list); - list_for_each_entry_safe(rq, tmp, &list, timeout_list) + list_for_each_entry_safe(rq, tmp, &list, timeout_list) { + /* + * Mark all requests even if we are unable to abort. The + * aborted flag can used by lower levels to indicate that + * the request should finished as soon as possible. + */ + blk_mark_rq_aborted(rq); + if (!blk_queue_stopped(q)) blk_abort_request(rq); + } /* * Occasionally, blk_abort_request() will return without