Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp533192rdf; Tue, 21 Nov 2023 09:03:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFePqVmwyYVmUcIcKO5GKOix1XGCxQuM/WwQQO069VG5W0BXF5YG6HBMULyrfdh2YrkjidG X-Received: by 2002:a05:6a00:8d87:b0:6c6:b762:ad8c with SMTP id im7-20020a056a008d8700b006c6b762ad8cmr10680456pfb.0.1700586237362; Tue, 21 Nov 2023 09:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700586237; cv=none; d=google.com; s=arc-20160816; b=L3ubouFSAnEK8ziZ0M99k9PwsAy+nx3lzIofVzDN7tEeytWuijlggNqrWMG43u1IfK Y3+kViA69W1vGGDrHWOdW4Qn2fIIb4JLuMzvG64ZJzCVM+QtSypI9YicvJuTgcxriWup GOj31+LqXRLWz9m5GDOkCZSr+AvxwWpBcNuz3qHXKts0cE2z6FZRaXK1pFdd0eCDbrSq Yzn1c16jPcbMh5Nvy4sG9V0HJNWM8Jn5A1jZo7JblkN7+m9hCNI9Q3hHdDxmYYsbgvTL BiBSIUlc+wVm4PJzfnOjQN3hplKyOSrLGvuS73fSYTZcyE+V297bfwEmEVAPKLfcPaQs s+ng== 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=Ekz0lnsExivNlFqBxpW1BrnU73sD+kINS6NqWLi26B4=; fh=LdrTGKdg+xxk/opA2pEfgAvGU9Cc5QFnNLiLTLd+pLE=; b=qMQkGoPDSdTnSiUwBF4QuxWGTer92o/QjjIDt29iKHF+FzrzFfSj4gea6vAdA3gN1i SaP+V07bSijvyqFpZQzzN09P79bDLS9MOJE8xNuL9G/eX9weUv5GGaD/QjHdBGXgEgNE /vvmLU7WqeIDjz/JgLS8GF3WB7KIhBlVQQCNuDEyQ5xrOwvUbH59vE/Dy9zkYczN5TOJ fTG/V36cT7Z8B2F3nPvzfzZN26075kwDIj7nLQnXD+Xn6pYP5QzaZFccPxTlSidzDmKr hwAptrHC9tfK9yHxP70A1ztWXl7npPP5RNZmRNC/y3aKfSLfZJosyq5Vw4F+0LXpvSJ2 1J8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e12-20020a65678c000000b00563d9ff5157si10552896pgr.547.2023.11.21.09.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EFFA580A30CE; Tue, 21 Nov 2023 09:03:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233066AbjKURDf (ORCPT + 99 others); Tue, 21 Nov 2023 12:03:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjKURDe (ORCPT ); Tue, 21 Nov 2023 12:03:34 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0EF12C; Tue, 21 Nov 2023 09:03:30 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 9D72267373; Tue, 21 Nov 2023 18:03:27 +0100 (CET) Date: Tue, 21 Nov 2023 18:03:27 +0100 From: Christoph Hellwig To: Johannes Thumshirn Cc: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Naohiro Aota Subject: Re: [PATCH 2/5] btrfs: zoned: don't clear dirty flag of extent buffer Message-ID: <20231121170327.GB19695@lst.de> References: <20231121-josef-generic-163-v1-0-049e37185841@wdc.com> <20231121-josef-generic-163-v1-2-049e37185841@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121-josef-generic-163-v1-2-049e37185841@wdc.com> 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_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 09:03:38 -0800 (PST) > if (test_bit(EXTENT_BUFFER_CANCELLED, &eb->bflags)) { > - WARN_ON_ONCE(found_start != 0); > + memzero_extent_buffer(eb, 0, eb->len); > return BLK_STS_OK; > + if (btrfs_is_zoned(fs_info)) { > + set_bit(EXTENT_BUFFER_CANCELLED, &eb->bflags); > + return; > + } Maybe these two places would benefit from comments on why the buffer is just marked as cancelled and zeroed out (that is to keep the write order because block numbers are already assigned)? Otherwise this looks great: Reviewed-by: Christoph Hellwig