Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp376766img; Wed, 20 Mar 2019 02:33:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAU8eRV8W3vhqzlk3Nxp+8w1hIl4PspaCcMrz+Zf+R6TEteVlEhaw7cpxrOZ2v47RVt0zg X-Received: by 2002:a62:39d6:: with SMTP id u83mr6774924pfj.161.1553074383002; Wed, 20 Mar 2019 02:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553074382; cv=none; d=google.com; s=arc-20160816; b=qMlv3tJxCGRi+jvFFhM6lnMUDTTfA0aFfkSpRhodjfwbTL9MDG/lhTsqwM/cvaEokZ TTS5Mi650RK5jz8WgBlgoOpMVxNsWmo+WlD1myKK5kMBipvulZWf1AMCIS8Iadyc5SnF ANQStRHaueenxO0U62qE77a+9+Mwur947khvDWfCLTmRLoN9v0xgzntoY/rDMlLF+EyS /HzzX1sYRIcZWoJ6tb3Wz+ABMcbgGnT+ZpGExlA/9RQaubD4azpy82aMGHVQ5EaTwaaq XmjT5gzdtF+RR6B1VuLAEGec1QK+/TWm35gxLMuaBe/BtSQS2dj3W/1iEk59sJ4k9oIQ 8xfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HqUz22Xeb66dEdp5+AWt8EICetFVkO9wCtaQSZzxk4c=; b=dVcshsbk0pvHsrC8WoY+uH5J50C47gW2r+FogCoateiI4csSXH5yBeXH8u7TnyzeDw iK/GF20WPHlGBHgQ/7kPaZ3iFZWx4e3AbEBFkP2ZuEKh25p5jYDzblerJZsy2sFP3Msa /2fCaRFZzTfIrKm4z1RBxY43jXKcjy+qigR309Y5seLjyrxmdmcyXMbLXziGhWIcFN79 Vt62EKn7SS0uk/gL7gT9cLM355Vl1Xp0jRW9iFYLbbelt5GvdPdZ2cWAiF6jw8Lo9cov UH+PJHkbXt0uiL7xf56CXzhnUgOScwVOeg6kA1xqplCamx1PUWm30uSvPxybeHH16aZT 5pcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si1244814pgo.246.2019.03.20.02.32.47; Wed, 20 Mar 2019 02:33:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727394AbfCTJaD (ORCPT + 99 others); Wed, 20 Mar 2019 05:30:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31823 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfCTJaC (ORCPT ); Wed, 20 Mar 2019 05:30:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 870FC30FD859; Wed, 20 Mar 2019 09:30:02 +0000 (UTC) Received: from ming.t460p (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4C7B5D9C4; Wed, 20 Mar 2019 09:29:57 +0000 (UTC) Date: Wed, 20 Mar 2019 17:29:53 +0800 From: Ming Lei To: "zhengbin (A)" Cc: axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, houtao1@huawei.com, yanaijie@huawei.com, jianchao.w.wang@oracle.com Subject: Re: [PATCH] blk-mq: fix a hung issue when set device state to blocked and restore running Message-ID: <20190320092951.GA9051@ming.t460p> References: <1553068921-6605-1-git-send-email-zhengbin13@huawei.com> <20190320081110.GA8408@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 20 Mar 2019 09:30:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 04:52:40PM +0800, zhengbin (A) wrote: > Thanks for your quick reply, I will study BLK_STS_DEV_RESOURCE in detail > > > BLK_STS_DEV_RESOURCE means that the driver will rerun hw queue, so > > maybe you need to investigate why it is returned from scsi driver first. > because we set the device state to blocked, > scsi_queue_rq-->prep_to_mq(return BLK_STS_RESOURCE) > -->out_put_budget transfer BLK_STS_RESOURCE to BLK_STS_DEV_RESOURCE > In this situtation, the request does not send to the driver. Then the queue will be run when the scsi_device becomes un-blocked, see scsi_internal_device_unblock_nowait(). Thanks, Ming