Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3438545imm; Mon, 4 Jun 2018 03:44:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1VpsuphjqCZnw6xBVguCqwPBvnxnOVm2EOlArioVALKdJ5hOvfZ1tPfGYXdIbIdvUkO45 X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr21024544plb.211.1528109067333; Mon, 04 Jun 2018 03:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528109067; cv=none; d=google.com; s=arc-20160816; b=qBY9o5h1bVpiFkkwdtyeEr5qC8Lox/ybrUEUrwgpSQCCwZrMpg7XsQYSBBzpA13nv4 DYTc7d3qYLdLEaAYqXyL0vNF8TnJdjCPENbjE4RfIu7xR6QN9AgY5MJ7F2ml+2qs5BLP MMRLsevYKdYM1U+SdWQlukgEdtE3wMrDB3fI5DexOeTutx+FDnJfj0vNlZRi4/coA84T CH+ou6Rvf4wZFswq38b0EYQC/iDxgpXY5IcsXBqPtpBRvrBE8u7io12zRCY/tT7z4stt 4CsTU1J1+ioa3dboEkF9FhkikX5o9uDpaTGMXKW3rLFjj/voOW0GHW3Z0kt86FS054O6 OF+g== 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:arc-authentication-results; bh=KKXOraRnwHgT84tbVzT8nEU8dtCgaTN7mde1vtA0bhc=; b=FjaXkCTbW36k7b40wFnzmbQVei7UlevDa28axMpiZdVs3m2xFppYxD6oVLpaxe73Ff 0TKvOR7LvQe09Ru+xUJSxi5yFTztJRdcHvMRZZFxbf5HIbFQ6E4n6uo77Z0N8Gpoajtp 2UvdTxvXW1p2RxH+lps+FIabzCU4IDKdL2qjZVxBTd0QOel4PaEYDB3jgXezx5O8lTaE SntCjaC92qTKS+dnXiPcwTlUAaZsYTxfjhH9RPz5haQKVQ2ptCCVFZG9mYmjajuouTj6 OhXnY/0lB4w0RPqd6GE2ci3ZdBU1gMETOQhTOQwtvbYL85gJg4Ah/v/Hv5Vglpr55bv8 ml7A== 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 v72-v6si4573318pfa.103.2018.06.04.03.44.13; Mon, 04 Jun 2018 03:44:27 -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 S1752098AbeFDKnp (ORCPT + 99 others); Mon, 4 Jun 2018 06:43:45 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42754 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751168AbeFDKno (ORCPT ); Mon, 4 Jun 2018 06:43:44 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1499A81AEBDB; Mon, 4 Jun 2018 10:43:44 +0000 (UTC) Received: from ming.t460p (ovpn-12-50.pek2.redhat.com [10.72.12.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC4DE1D088; Mon, 4 Jun 2018 10:43:32 +0000 (UTC) Date: Mon, 4 Jun 2018 18:43:28 +0800 From: Ming Lei To: Jianchao Wang Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn Message-ID: <20180604104327.GA23074@ming.t460p> References: <1528103035-8009-1-git-send-email-jianchao.w.wang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528103035-8009-1-git-send-email-jianchao.w.wang@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 10:43:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 10:43:44 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 04, 2018 at 05:03:55PM +0800, Jianchao Wang wrote: > if hctx is stopped, don't run the queue in blk_mq_run_work_fn. > > Fixes: 15fe8a9 (blk-mq: remove blk_mq_delay_queue()) > Cc: Ming Lei > Signed-off-by: Jianchao Wang > --- > block/blk-mq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 9ce9cac..d0ee928 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1578,7 +1578,7 @@ static void blk_mq_run_work_fn(struct work_struct *work) > * If we are stopped, don't run the queue. > */ > if (test_bit(BLK_MQ_S_STOPPED, &hctx->state)) > - clear_bit(BLK_MQ_S_STOPPED, &hctx->state); > + return; > > __blk_mq_run_hw_queue(hctx); > } > -- > 2.7.4 > Reviewed-by: Ming Lei Thanks, Ming