Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5568817rwb; Tue, 1 Aug 2023 05:00:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKbhCbR0So93DLqcOuDfU+kxAaSa/lfHqgLd9KeOCp3PH60ob0Dqomh8ter+ssP5dEn5fF X-Received: by 2002:a05:6a00:1512:b0:666:ad0c:c0f4 with SMTP id q18-20020a056a00151200b00666ad0cc0f4mr16830858pfu.23.1690891214600; Tue, 01 Aug 2023 05:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690891214; cv=none; d=google.com; s=arc-20160816; b=R1mGSkWR7goZqtGZ7/2I5qIzpCTmypNwwal24OJBDCULXAHVoiFOz+NfMnU/ALLBBg 1NoC+xxlTzvF3nYk8eNoF6nO85g1phQ7pd+2gtrLSqDo3uqG9mieRKCsexSWyQjeO4ye +xhAn+beTqyMPKXzAyMJ298yJicEQTux+SFLaR/pYhfTUC/G2D68LzTDOxefnDvPNvyS 2mdakWXaF+rCLWSs9NU9NHLU+Qkn3j/Jh3tY02C6HWLu8ZZdrieD70NUHApUevoTEjZl pQ1UY1cSUR3gOk6Dq7pvLiRBME8cq1ieJuw/SjlaGN9QFCsZ20tqVyVVmoXBWDyq1ZOe dboA== 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=cQDIpMzjYKTe6FIueBriQDRq2D+EDhXyXf7Oz0NM29g=; fh=apVG7BGA8w8PK+2KEcUnySAz0NvEtZkSibwxBYKCHJE=; b=NEZfegssM3+ui/CSKxCweab/9Jks5g7we3xQ1K9/egbSbK8YQab3laaBdCUvTXO9Ox w2GLBhdS80u0YcyVzheA1PJmIu4WuFzvyP1zFldegWjKXo84r2ufEu+CVThZTF9DkYrt u947iaTFAZE7yytOGgSuxzveFmQYzGGnO+3ZhSbjbAL46J9Z5YAsX0z5/5HZgGVX27fw 6t5UC6BKfB9IMj5g0jycKx2N2x/amarOHVj9BLyBtNZvWrE8Ctw9CjTxfKOTir7ET22d QWIR68ey5f60Av6EkBvHsvgkpPpYdaNc/RW0oLCJ4sAGnU3ayJOrNgBzkTAPB4wc1zdu qgpw== 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 v8-20020a056a00148800b006871817f76dsi6350465pfu.202.2023.08.01.05.00.02; Tue, 01 Aug 2023 05:00:14 -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 S234307AbjHALLm (ORCPT + 99 others); Tue, 1 Aug 2023 07:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233697AbjHALLL (ORCPT ); Tue, 1 Aug 2023 07:11:11 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F0F1FC7; Tue, 1 Aug 2023 04:06:10 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 49B2C68BFE; Tue, 1 Aug 2023 13:06:08 +0200 (CEST) Date: Tue, 1 Aug 2023 13:06:07 +0200 From: Christoph Hellwig To: Hannes Reinecke Cc: Christoph Hellwig , chengming.zhou@linux.dev, axboe@kernel.dk, ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com Subject: Re: [PATCH v2 1/4] blk-flush: flush_rq should inherit first_rq's cmd_flags Message-ID: <20230801110607.GB2781@lst.de> References: <20230725130102.3030032-1-chengming.zhou@linux.dev> <20230725130102.3030032-2-chengming.zhou@linux.dev> <20230731060957.GA30409@lst.de> <20230801110432.GA2781@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230801110432.GA2781@lst.de> 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 Tue, Aug 01, 2023 at 01:04:32PM +0200, Christoph Hellwig wrote: > On Mon, Jul 31, 2023 at 06:28:01PM +0200, Hannes Reinecke wrote: > > The flush machinery is sending flushes before and/or after the original > > request (preflush/postflush). For blocked transports (ie during FC RSCN > > handling) the transport will error out commands depending on the FAILFAST > > setting. If FAILFAST is set the SCSI layer gets an STS_TRANSPORT error > > (causing the I/O to be retried), but STS_ERROR if not set (causing I/O to > > failed). > > > > So if the FAILFAST setting is _not_ aligned between flush_rq and the > > original we'll get an error on the flush rq and a retry on the original rq, > > causing the entire command to fail. > > > > I guess we need to align them. > > But you can't, because multiple pre/postflushes are coalesced into a > single outstanding flush request. They can and will not match quite > commonly. And if you mean the REQ_FAILFAST_TRANSPORT added by dm - this will never even see the flush state machine, as that is run in dm-mpath which then inserts the fully built flush request into the lower request queue. At least for request based multipath, bio could hit it.