Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6666508ybn; Mon, 30 Sep 2019 01:36:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqy88YCMnP1uAnakkHzyWBDHosU7x45Pam815UgGf0oY9lBdNNPWGmHvuIZyjV46VjEj/l0a X-Received: by 2002:a50:99d5:: with SMTP id n21mr18404889edb.50.1569832604338; Mon, 30 Sep 2019 01:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569832604; cv=none; d=google.com; s=arc-20160816; b=KzyvEQL+Gu0wAdGcDsteWBOek4Oh0cN9FSAYmjbT70p1dWvtPZXMB7NI6WL2HxUyiF xnxrIEG2/aQi5EUoc1Vlq13tfqa+04p35bkojZe8SrLiCGsCw/oJlFPngIggd5YPM038 umBoneupBjwdLNrbGTV4HNXw4MOIBmC6/i6KEwDiX/Gl6fAmncCQR0hN7IySf2j2Pwiy FA4ZLlTYiBwzjaQum4mGpPVJMoUykU9A9pJ+PGLq0fTogpcjcK1NO6bO+rcd80WPQ4V6 3nkgMBTcCNcJPz2ctdDQkKSRg2WnjvG+2R/ZfrMDVPBCrprLuHx7PCJcFXl9OdMC0uta 2PCw== 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:dkim-signature; bh=uNz1pYDflKfewyxuMkqkNfMrUP0dG6fDyG6MbB0Wf3k=; b=wUxWwrw7+Nxo7AAJvjfH8tmQGMRJuftI4JdI9kSuaC1l2MAfEHJy6srBrJ39gpF15y cSDPCD0F8kEFNsWoUK0GhFQa2Dr4DTPIMsB4GU+I/g5CkrNwGF/Z8ea5OZUm3moKnB+1 HMg/SwvSgFzcj9qEn+eYHvUlQFS1S+W8smicesDMNiQLk2jCuKjp4BP5uU+aetGj7YS6 o2jma+kPEJARxxjzMsfsV45N7g35vlzZhap3qRU5hbLUQ5JS0W1gwcAbHXJNEj0XYUNC yfqgZjAijfqCcTaq8SU6ChUUenafHvO9owL1JT85a1vwRhy7DTfEiFJc1ssD8cvXgT9Q Snkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T2uBEnaZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si6536033ejp.326.2019.09.30.01.36.20; Mon, 30 Sep 2019 01:36:44 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T2uBEnaZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730046AbfI3Ida (ORCPT + 99 others); Mon, 30 Sep 2019 04:33:30 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37888 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfI3Ida (ORCPT ); Mon, 30 Sep 2019 04:33:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uNz1pYDflKfewyxuMkqkNfMrUP0dG6fDyG6MbB0Wf3k=; b=T2uBEnaZhPeL9m1jaPMfR3xmM 85aA9cZHSh8ENnsCjnhdOPM36HMtWiLObPqCFdg1G8acyTtZXKgHWN87niFEHdlpakR0/8rnluYd3 HjxVSxKr20xrhRPHQYLD4Cvzpjrr0Fp15vkUlDRREtsHKV4eBCjJLziHWSiAX+vdj2spZiSJJIIU1 fje18BshsMCnJ/TmCAHsayTVngMtfbm+RNRgnu1KL7Ui0/TeTo3CeYrS575n7YkHeDCJFWn+wIPQv AIBOj6aoWF8vhHQyfvWlOdmca+lrinlD0ALtO65vSP5rnNPUTL+gRwI8PXMr81+JWCOt61prwjK6/ UoHYV56rQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEr7U-0006fC-OS; Mon, 30 Sep 2019 08:33:24 +0000 Date: Mon, 30 Sep 2019 01:33:24 -0700 From: Christoph Hellwig To: "Pavel Begunkov (Silence)" Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] blk-mq: reuse code in blk_mq_check_inflight*() Message-ID: <20190930083324.GA24152@infradead.org> References: <11ebb046bf422facf6e438672799306b80038173.1569830385.git.asml.silence@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11ebb046bf422facf6e438672799306b80038173.1569830385.git.asml.silence@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 11:27:32AM +0300, Pavel Begunkov (Silence) wrote: > From: Pavel Begunkov > > 1. Reuse the same walker callback for both blk_mq_in_flight() and > blk_mq_in_flight_rw(). > > 2. Store inflight counters immediately in struct mq_inflight. > It's type-safer and removes extra indirection. You really want to split this into two patches. Part 2 looks very sensible to me, but I don't really see how 1 is qn equivalent transformation right now. Splitting it out and writing a non-trivial changelog might help understanding it if you think it really is equivalent as-is.