Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7370265rwl; Mon, 9 Jan 2023 23:10:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXuvCWYJXKolyaJTs/QrekTN1Mq7FB+VLBg5eUrjiynX1qze7qQnekxv+DqqJJeuwgTFdKPk X-Received: by 2002:a17:902:b609:b0:192:e9cf:93ba with SMTP id b9-20020a170902b60900b00192e9cf93bamr21673266pls.12.1673334637703; Mon, 09 Jan 2023 23:10:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673334637; cv=none; d=google.com; s=arc-20160816; b=RKiPI2p1nRBgsxNVuTKB/V62syOzFb4orAg3SZZOfMmTcFFWKu4nXPkv9YE9F/QXt3 sqgzhF+5a57eG+fLtOiIidjCT+c0634h151MvoepL2/TK5RyPu7t8DqpBTxMFEllmHcG 4bof1nVE9XuI5fQFbD3VwytHbjskRZQL6LqXDnT24/EeUEdIck5vls5NcSRdg0ScO9YV tET6HyTX7tLdOGwLlIytvAtn56PGqU5NrX6WazAEryE/b9n55F6CcsLIlroDWATQ/C0l 9IBBeHFN0UxRyHF/bxwTntkHNYLy03XEN3jUMtBZ/RLrtEduCaeiKqMLOmam14W0wKTe IQLw== 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=fnmj7Y+R85QIR73qvSCn6qA+u6iYkAkBoNcPfPVxG5g=; b=wi0hPAgDX2sFfqelR9FDDgKEDfw5gdzkLXR5G0o/9Fk1JaEBi0B7h7tC91fknLConC 0f6evUCNnBoN/cxwU3/7Dgou3GzuSs39yJEcOX0+xVwhsAitjNFUuyZBdTR08HsjfptA psZzxoagGfuoTfc1fJLuV542EX7LYbWFWP+2FJoGrp0F7ebzXk7CAyqFiH8OtXIaJGu4 DP5AEC3lzFkKHInieTFSylUP4iZ4iY63z6PG8Gc0kAhg/26qEhBrF0Q09I8AHkSNIpgv BWolQa5AC4ZHI7BefBuSN9litdCIx+Yqz1fI8yStbThaCvmqH2N2djFFS6g1FlTG6AXI txTA== 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 l4-20020a170902f68400b00186c37272a6si11640775plg.178.2023.01.09.23.10.31; Mon, 09 Jan 2023 23:10:37 -0800 (PST) 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 S230083AbjAJG6l (ORCPT + 53 others); Tue, 10 Jan 2023 01:58:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbjAJG60 (ORCPT ); Tue, 10 Jan 2023 01:58:26 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5E90392D8; Mon, 9 Jan 2023 22:58:25 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 47C9D68D08; Tue, 10 Jan 2023 07:58:23 +0100 (CET) Date: Tue, 10 Jan 2023 07:58:22 +0100 From: Christoph Hellwig To: Pankaj Raghav Cc: axboe@kernel.dk, kernel@pankajraghav.com, linux-kernel@vger.kernel.org, hare@suse.de, bvanassche@acm.org, snitzer@kernel.org, dm-devel@redhat.com, damien.lemoal@opensource.wdc.com, linux-nvme@lists.infradead.org, hch@lst.de, linux-block@vger.kernel.org, gost.dev@samsung.com Subject: Re: [PATCH 7/7] dm: call dm_zone_endio after the target endio callback for zoned devices Message-ID: <20230110065822.GF10289@lst.de> References: <20230106083317.93938-1-p.raghav@samsung.com> <20230106083317.93938-8-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230106083317.93938-8-p.raghav@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Fri, Jan 06, 2023 at 09:33:17AM +0100, Pankaj Raghav wrote: > dm_zone_endio() updates the bi_sector of orig bio for zoned devices that > uses either native append or append emulation, and it is called before the > endio of the target. But target endio can still update the clone bio > after dm_zone_endio is called, thereby, the orig bio does not contain > the updated information anymore. > > Currently, this is not a problem as the targets that support zoned devices > such as dm-zoned, dm-linear, and dm-crypt do not have an endio function, > and even if they do (such as dm-flakey), they don't modify the > bio->bi_iter.bi_sector of the cloned bio that is used to update the > orig_bio's bi_sector in dm_zone_endio function. > > Call dm_zone_endio for zoned devices after calling the target's endio > function. This looks sensible, but I fail to see why we need this or how it fits into the earlier block layer part of the series.