Message ID | 20200319123938.213868113@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=1QoN=5E=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5FCFC4332D for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:10:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A97842145D for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623454; bh=/18kTopnrkc7k6kqaEp+1pzsiGmVmHexcs8erim2Flg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uhA0eIEu0XIc4upqtVlbAi7Wvi8hT7uKj07ZmY1dKLTB4RfEHEfD5Iia7py74RLN+ Z/KPS6GmU9fiyyPa9RhPnBZAhdkxkIltwd6LtCP5BCNEWhc0GMnlFOzTn17jaTOElS OsS7vNOOy44F17UNGoy+GKX8d1CbjCndSHv0LNHo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728138AbgCSNKx (ORCPT <rfc822;stable@archiver.kernel.org>); Thu, 19 Mar 2020 09:10:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:55836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728593AbgCSNKw (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 19 Mar 2020 09:10:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 93A8D20722; Thu, 19 Mar 2020 13:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623452; bh=/18kTopnrkc7k6kqaEp+1pzsiGmVmHexcs8erim2Flg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tq4xUuxMiRSxDg7D+ZVOrXTiWds/Bw5Wh0OccYjnEoCyVX/L1YEhgbX3xb0Omamu3 tjRchqV5IYAKDLn8BcJRFkb4tDJ7SbQalwsFbG+8gc8ayty4EhWClwLDVtwzGNVbSj irD631yamywplZdEltZSgasopCe1Fs8aWcg9ISRk= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Halil Pasic <pasic@linux.ibm.com>, Jens Axboe <axboe@kernel.dk>, "Michael S. Tsirkin" <mst@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com> Subject: [PATCH 4.9 31/90] virtio-blk: fix hw_queue stopped on arbitrary error Date: Thu, 19 Mar 2020 13:59:53 +0100 Message-Id: <20200319123938.213868113@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123928.635114118@linuxfoundation.org> References: <20200319123928.635114118@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -215,10 +215,12 @@ static int virtio_queue_rq(struct blk_mq err = __virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num); if (err) { virtqueue_kick(vblk->vqs[qid].vq); - blk_mq_stop_hw_queue(hctx); + /* Don't stop the queue if -ENOMEM: we may have failed to + * bounce the buffer due to global resource outage. + */ + if (err == -ENOSPC) + blk_mq_stop_hw_queue(hctx); spin_unlock_irqrestore(&vblk->vqs[qid].lock, flags); - /* Out of mem doesn't actually happen, since we fall back - * to direct descriptors */ if (err == -ENOMEM || err == -ENOSPC) return BLK_MQ_RQ_QUEUE_BUSY; return BLK_MQ_RQ_QUEUE_ERROR;