Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35383452rwd; Mon, 10 Jul 2023 06:47:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQscQolc7J6pUSbl9h6Kqp5hivwiLDM7BPcM/ZLJtKzRs/elwggLBnIBCadesW7FJl45cr X-Received: by 2002:a17:902:d486:b0:1b2:1b22:196 with SMTP id c6-20020a170902d48600b001b21b220196mr14458456plg.48.1688996833558; Mon, 10 Jul 2023 06:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688996833; cv=none; d=google.com; s=arc-20160816; b=NLfIRf0AdTzZ0hWLQf2X1eYx+npUkDnY3GAxArUvi5zIZiQUf6q/4k2SKFLsc8y+tD Ffm9MtSPKxJQV6y3kkLocTdqV+UzTU0//3ZAd3lhQ5P/0ofYcWNjMkEPT9pbHOUS2vU5 FBsruoTHM/B2I/5QrxirCwGR7zzMvBC+8+4Pgo0L6zzR6+4yuaFU+xGy+k4G8FjG17SU fmyurKkDTLpqQ4NyaRxD7WUvU+n18LBoeqgy/oUoGVjx10lxj7TKyRNKyfkM4/Z4kUED 5l+YW+C/Nv1PceBa3UgqbR7uzFqPBWNhS74r71/e2ZNwWjmbwB8kAya5aZrSuKYxtlTI SfbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=mC+LeYt1oIUM4XUgUkUAGvVsv9b7fxil1HcBEign7Q8=; fh=1vuUTineNPguhZ+8zOKbSd1JaGAv1oLTdRFgyn7ljmw=; b=FwFCDhOumnajHAzL/Eg3h0l7PWnZeoRUiySo2HEHCfnoCLwarPhvg0oWGe0lC/2mk8 t8edYjB5HZHJchO5j4f2P3cxwOWXrd160KASpLEK+dw5rGW8ovOBHYqdCZcXTxfZBr0Y 8iey6BZnO7WlCQvpdglKRyrXBbr9YJtG8T6SmW5N2x6S0QVnqgiO11/OFWWreEgb7hxK KbZ22X8tMYcj1ghHpbeqfQeddUiBDmI4XY0F/jh7FxHhklelQn1YZOtJ2koQDoMYXmpA Q7uIe25rE6cXUPrlbmMf2c7w1n6hvWWneaAfvculrQ0lJqgZY7Pwjo880elZOvImM7Ta mjfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a170902be0100b001b3d6c68bd1si8638849pls.643.2023.07.10.06.47.01; Mon, 10 Jul 2023 06:47:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjGJNad (ORCPT + 99 others); Mon, 10 Jul 2023 09:30:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231625AbjGJNab (ORCPT ); Mon, 10 Jul 2023 09:30:31 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5435FB; Mon, 10 Jul 2023 06:30:29 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 1008867373; Mon, 10 Jul 2023 15:30:25 +0200 (CEST) Date: Mon, 10 Jul 2023 15:30:24 +0200 From: Christoph Hellwig To: chengming.zhou@linux.dev Cc: axboe@kernel.dk, hch@lst.de, ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com Subject: Re: [PATCH 1/2] blk-flush: fix rq->flush.seq for post-flush requests Message-ID: <20230710133024.GA23157@lst.de> References: <20230710064705.1847287-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230710064705.1847287-1-chengming.zhou@linux.dev> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 10, 2023 at 02:47:04PM +0800, chengming.zhou@linux.dev wrote: > From: Chengming Zhou > > If the policy == (REQ_FSEQ_DATA | REQ_FSEQ_POSTFLUSH), it means that the > data sequence and post-flush sequence need to be done for this request. > > The rq->flush.seq should record what sequences have been done (or don't > need to be done). So in this case, pre-flush doesn't need to be done, > we should init rq->flush.seq to REQ_FSEQ_PREFLUSH not REQ_FSEQ_POSTFLUSH. > > Of course, this doesn't cause any problem in fact, since pre-flush and > post-flush sequence do the same thing for now. I wonder if it really doesn't cause any problems, but the change for sure looks good: Reviewed-by: Christoph Hellwig It should probably go before your other flush optimizations and maybe grow a fixes tag.