Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7424594ybn; Mon, 30 Sep 2019 13:43:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAj1xwypmysXisK1hZAlATseM2xwEyxVjGaOpToO8tPYpaUWi8M4O/BOjR6Du3jHIcsYf6 X-Received: by 2002:a50:e718:: with SMTP id a24mr22044559edn.289.1569876233821; Mon, 30 Sep 2019 13:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569876233; cv=none; d=google.com; s=arc-20160816; b=ycUai3PY8qn1uGyer7KqQW/F/aBgosAn+xTA2xp7JdW2y7WpVk0pqXKd7td2bThwhD qrDx0tz9V/X8dHE1+IyuUCE9WEVls48OMbiHaStdYK5TZbCcgElCtFBlKLetaKzO8Kjf 0JoSfw4HAf+mghtM2b3lBw/Z0v7w0OpkZwa20d8ygJ/o0y2dzRwmc+R7++UUFrAFScMK +dq3EV1x8SeItDj9xkb65Wg8R7DEaPldYFDJ5uf3Y4Uc8jYr+FRBw05rPXfVH/cCBxN0 ps/GkRT4DlXCWemiZjnjD+JWH7l5Znxr/ZvvBJqZQlTcg+jcoMsea1OkYrnl5cm4pOSR CT4Q== 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=BxUwFsZox0loR1JhpSTK7GNDf8PJxaH7PjZEHNO3l4o=; b=hoGg4QZ4w9OxaWP7JAxsxRhl1nCRYhQc5UwnfdtBr7TG9TSPU31ujs69E2NSAwIj+p XEreX/FLSuATdGFpvI6YwYVZlom1ntiUz1ks7I9yb6luwolDueNQy83pky9kzQxLQ2Gb k5RxIHmST8X4KpBWxYVKtwHFL1JKoZltfByLii0gmDj5DEckhgp8vaHX+VLj6tBFvmwa DWDPVUB2q43P/4f9/Xqn7vh63PqHC+EFPnWPr0Qezb7D4kvEjXX0bMWyK1Y5btWTPsVq uhk9HIW8AepPH9m8cINqxYaWSUXCPotBM6QjLEBDn9XBCBpqT1Tsy+L8S2Xlt5zGEzEj G6rg== 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 x17si7512541ejw.375.2019.09.30.13.43.28; Mon, 30 Sep 2019 13:43:53 -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 S1731229AbfI3Uim (ORCPT + 99 others); Mon, 30 Sep 2019 16:38:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731193AbfI3Uim (ORCPT ); Mon, 30 Sep 2019 16:38:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CB3933082231; Mon, 30 Sep 2019 20:13:25 +0000 (UTC) Received: from localhost (unknown [10.18.25.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18B5A60F80; Mon, 30 Sep 2019 20:13:25 +0000 (UTC) Date: Mon, 30 Sep 2019 16:13:24 -0400 From: Mike Snitzer To: Bart Van Assche Cc: "Pavel Begunkov (Silence)" , Jens Axboe , Josef Bacik , Keith Busch , Christoph Hellwig , Sagi Grimberg , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@other.debian.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH v2 1/1] blk-mq: Inline request status checkers Message-ID: <20190930201324.GA19526@redhat.com> References: <1cd320dad54bd78cb6721f7fe8dd2e197b9fbfa2.1569830796.git.asml.silence@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 30 Sep 2019 20:13:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30 2019 at 3:53pm -0400, Bart Van Assche wrote: > On 9/30/19 12:43 PM, Pavel Begunkov (Silence) wrote: > > @@ -282,7 +282,7 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) > > * test and set the bit before assining ->rqs[]. > > */ > > rq = tags->rqs[bitnr]; > > - if (rq && blk_mq_request_started(rq)) > > + if (rq && blk_mq_rq_state(rq) != MQ_RQ_IDLE) > > return iter_data->fn(rq, iter_data->data, reserved); > > > > return true> > > @@ -360,7 +360,7 @@ static bool blk_mq_tagset_count_completed_rqs(struct request *rq, > > { > > unsigned *count = data; > > > > - if (blk_mq_request_completed(rq)) > > + if (blk_mq_rq_state(rq) == MQ_RQ_COMPLETE) > > (*count)++; > > return true; > > } > > Changes like the above significantly reduce readability of the code in > the block layer core. I don't like this. I think this patch is a step > backwards instead of a step forwards. I agree, not helpful.