From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 696C0C46467 for ; Tue, 10 Jan 2023 06:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673333924; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VInpV8pzj7SfApMFgWgw+/9BNK2/PW+MmJOghBEMpwU=; b=bZXeKsqafYSdCDapY6avg1d5oYwmBUThdHBBeA2PZHuq/VGDEZtm2Q0xZx5czMLmDA3PBS 91SMadT+goVFnV2/IHBCaUgfWZ2mDYrtjMkbI3xy7B978Ls0hqaHhimkHmDqLvRDV5TGfY FZqeD5EpndX3fpR26TCa4ORXLX99kbM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-493-ErtxNl8wNVasECoqZJoEEQ-1; Tue, 10 Jan 2023 01:58:40 -0500 X-MC-Unique: ErtxNl8wNVasECoqZJoEEQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BC313802D1B; Tue, 10 Jan 2023 06:58:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F6C7422F2; Tue, 10 Jan 2023 06:58:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2C5011949751; Tue, 10 Jan 2023 06:58:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A2F651946587 for ; Tue, 10 Jan 2023 06:58:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 815F6C16032; Tue, 10 Jan 2023 06:58:36 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79CFDC16031 for ; Tue, 10 Jan 2023 06:58:36 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63DD7185A794 for ; Tue, 10 Jan 2023 06:58:36 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-dhyN1f0WP-O-zXla_LXM1g-1; Tue, 10 Jan 2023 01:58:26 -0500 X-MC-Unique: dhyN1f0WP-O-zXla_LXM1g-1 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 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 In-Reply-To: <20230106083317.93938-8-p.raghav@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Subject: Re: [dm-devel] [PATCH 7/7] dm: call dm_zone_endio after the target endio callback for zoned devices X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: axboe@kernel.dk, bvanassche@acm.org, gost.dev@samsung.com, damien.lemoal@opensource.wdc.com, snitzer@kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, kernel@pankajraghav.com, dm-devel@redhat.com, hch@lst.de Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD7EC54EBE for ; Tue, 10 Jan 2023 06:58:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjAJG6f (ORCPT ); Tue, 10 Jan 2023 01:58:35 -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) Precedence: bulk List-ID: X-Mailing-List: linux-block@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.