Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5585531rwb; Tue, 1 Aug 2023 05:12:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlE49It0QA7sGv2kyl8HLQmzBSlzuKCSsYzYue5JjpaJZaerWbsdHmmG5SvI47SCUggK/QT+ X-Received: by 2002:a17:906:108f:b0:993:e752:1a6d with SMTP id u15-20020a170906108f00b00993e7521a6dmr2462482eju.18.1690891928629; Tue, 01 Aug 2023 05:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690891928; cv=none; d=google.com; s=arc-20160816; b=PTIk7lAGCOAb870m1heHF8ut+fN1dZCBzjkFVsDKfvY7ibmu341dADZZHB25KQ9bJY 2edrQ34T8PVEfVUnVcHd3psKE1w6KZVjm5P3FxOyhrKwNoXiyf7zUG8cbll7fVFPMiyQ TJTrLCK8qLulACs6og8FiRoAXveeisJVXkItDJ1ku8qrirz/Tl7gK8dhUJ+ylFFy70Lu weHjVXhHK96Y4JY1IP9DBW0HPSMVsTTN15wWqv6gHx8Fr6g3VBCBbCrGXo/5qy9l5ypV f9Q+sBWRfcJuvZ2I7BHMd3nhRBHXLR1iS59zSBvVMkzmivo44NBWyWr6Z+IbGdUKPeJ7 oH6Q== 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=LZRp3t/8k6aVhf2XMrNbUTugInG4z3GVNiIDDZAUhpE=; fh=apVG7BGA8w8PK+2KEcUnySAz0NvEtZkSibwxBYKCHJE=; b=D+xNv4Q2B0+QZRVfjuFakssuW6jC+o6WuecVKhdu6b2E00ppKZAQZa8elM1E4iV6aj JY8zMLoFgI7PekidFw2QBmvxQxyehU+S+9UWo92DpVcSKQJvTjnC5RfYM9czTXZgQ7Ht uMW/eADu2wGxLYHdX0ww/gRKGmTGv2Pb34BzldyDmXi1IU99cPHONsTRzl3Q3BMIt/Dg ipMOgYo/EdE9uMh7Cx672hfRwbBdUQS8GpwDMP51R5ECz/CunyRSwvoRSWgzdioNvCja 7//nB9Jgav/yK0NaNUiZjfEw5tZomMDifI0aOZbTp3fh5vsm+fXHiqsdBHg5fg90YBUw DBbA== 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 n19-20020a170906165300b0098dfb10f3a6si8207685ejd.107.2023.08.01.05.11.40; Tue, 01 Aug 2023 05:12:08 -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 S232435AbjHALKd (ORCPT + 99 others); Tue, 1 Aug 2023 07:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbjHALKE (ORCPT ); Tue, 1 Aug 2023 07:10:04 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 215B84ED2; Tue, 1 Aug 2023 04:04:35 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 2FAC56732D; Tue, 1 Aug 2023 13:04:32 +0200 (CEST) Date: Tue, 1 Aug 2023 13:04:32 +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: <20230801110432.GA2781@lst.de> References: <20230725130102.3030032-1-chengming.zhou@linux.dev> <20230725130102.3030032-2-chengming.zhou@linux.dev> <20230731060957.GA30409@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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.