Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36682473rwd; Tue, 11 Jul 2023 04:29:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlFjQfbygZRb1rWX5JR50nihbpItty6HCgeENokSTPLctkSwAgV5XyBBnUWkUCCgDKGosKbi X-Received: by 2002:a05:6358:9147:b0:133:4ce:4e8c with SMTP id r7-20020a056358914700b0013304ce4e8cmr14808679rwr.29.1689074953668; Tue, 11 Jul 2023 04:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689074953; cv=none; d=google.com; s=arc-20160816; b=MBDOG5ffB0IC+l0QBI5XkAE9mHuYltzFqRNmmiQbvlUqfnwPB6BvIwMNA9BEuYpm3e XbB2wCX5AqXCU+MwSbk2LOCisPzgZrXaCRn5DleT6DRYSkMPHoTY/U04FaGpwKAzoj7Q XmQaLX+iCaMFmJvIcGavP4NSdSRsIbYNglBf0QB9yqUgMHRHenDko627QCMKk4EWX6Rf Gldan+vLhh0SdPPzqEuizlcen2qBAHUqN2rU7gaAhCALNyyXjB4YUF/qOtQj2jHy7w6y jlYpoGm5kctoaXj/PrKtb/hIO3cUFxitGFiFQokerQ7baOu4NlPUWCflt5cmAEfTO+tR mkKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=qMioJTi4y2yktAcf9xKDTRkg/Tfq6T8MUKYPAN6XQNE=; fh=jOguULFzKD0eP94aYDSt0kpm1rHPvAOwZRdRG2JmQN4=; b=EZS4dGMvNyivDzTDUrltoQIiw8qC0QQoMbVN9wOeW09dOBHMjrnh5J2RkOJ/bEwCGi ELMvbrzpiHeY2NVgOOwuosFDKKXc89VxQUJLG65eqIpfdpJ5uJH/Iaqm+2NgLTHFOMMX hErVSIr9wD9sa71H7Jh3ydCbewjxxP0X8rEOxaFFVpLRZuYT1ZXuTZe+4T4cvvMuDDH8 Ja7dD0c79Eau5Zp+IjQFvMp4+hexAUli9jsvPsaYuyvqjEyBAji+6H4u2o3U4J27QTKM LvxuLoCzAb70dCWAFG9H5dxEFxxeaGkaUEANbGqyFRo0FLMPrXyk1UWICcP0dOxP47qH 0sYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=JncusKNO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a632406000000b0055af2b13196si1238372pgk.501.2023.07.11.04.29.01; Tue, 11 Jul 2023 04:29: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; dkim=pass header.i=@linux.dev header.s=key1 header.b=JncusKNO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjGKLGb (ORCPT + 99 others); Tue, 11 Jul 2023 07:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjGKLGa (ORCPT ); Tue, 11 Jul 2023 07:06:30 -0400 Received: from out-14.mta0.migadu.com (out-14.mta0.migadu.com [IPv6:2001:41d0:1004:224b::e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B9BD98 for ; Tue, 11 Jul 2023 04:06:28 -0700 (PDT) Message-ID: <4431d779-e6e7-aff1-5cf8-4147de974d8d@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1689073586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qMioJTi4y2yktAcf9xKDTRkg/Tfq6T8MUKYPAN6XQNE=; b=JncusKNOhbbD+6X8VyMjkP3dbCPVKOB1W1YoXAImaqaMgwRb9fNudqbjZOdocOW5r3XCdy C/AXSJWtBOzGXaStNlFu75e9xwwqTeTc+hbsboLj+OxpiXUGTW/ZlmqsreKCVf2o+Mn1OR Dc3XDamu2g9nOnoJ6cXPbYQc4A1sz0s= Date: Tue, 11 Jul 2023 19:06:20 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 1/2] blk-flush: fix rq->flush.seq for post-flush requests Content-Language: en-US To: Christoph Hellwig Cc: axboe@kernel.dk, ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com References: <20230710064705.1847287-1-chengming.zhou@linux.dev> <20230710133024.GA23157@lst.de> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou In-Reply-To: <20230710133024.GA23157@lst.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 2023/7/10 21:30, Christoph Hellwig wrote: > 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. Ok, will add a Fixes tag and send it as a separate patch since it's a bug fix. Thanks.