Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp432171rdh; Thu, 23 Nov 2023 07:48:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpteeJdzrBmrhcT7CqDEeOHPiokQmDBDhNi03p2kLW/FmAxgOejXcCwymbb3DqYNfD2AtI X-Received: by 2002:a05:6808:b2a:b0:3ae:1358:fafc with SMTP id t10-20020a0568080b2a00b003ae1358fafcmr5949717oij.58.1700754504271; Thu, 23 Nov 2023 07:48:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700754504; cv=none; d=google.com; s=arc-20160816; b=P1btKsMiSin6iaL56/bnLj/ea7mZ7qfCb7RUwDxFInBi97uJk4VGd6E5UaPEqI+E4O q0545jfReCAtvw2eI7KRjWorAlWE2f6++GOwMkF0cktW90+dDZWmXmsOtYW05qmABKyD aMAdxx2YhtgAzK5XsIPDVCCmAfrPoIN6qeGJ9TtzemoXKzAuTEgUjVFE2cvxy5X0ZlmU OBdQmcMWYQxMZNyvArbGCC1xyavGKVBfezKgxcWEgUiv9Cpb71pqNiNf+Dv0etca0HEi 9hEJihXAbQTYnQePKST7k2iGdLDonsIbnrypX/AJjdLLD6OwSHyKrsmlr75Kn8zTwI/V cYkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:wdcironportexception:ironport-sdr :ironport-sdr:dkim-signature; bh=4oGXqTx02wYf6mUHhSjqn4uPfh6n3cTTN8KZdsSs8tE=; fh=5/viNv8Fzx+nCNW5PGLTL+Se/9D0Q8TrzLPV3SudCmU=; b=v15eBejhmL8wKri+ZBsAnIeWFVaDm780tvA0+4XHCGvcAsYOX4pQUkUKIWZYK8vW6H HHL7DR/hhomGuxMWSDK37qIyemuD9jsFtSxsTnRxFOPt1rgXeh6+epJMYfWSyAHm4akI G/GnyPxYIWmIqvuJ8cFb7UN4LIUWauX25lwh6K/Bn/7Uk1RbGI288anZzWsWiPPzL7v1 cdntfHShZjWy2AqKGYjbrIJ/t8k6g+0fGddvAMGLm4UkqqzlDNdCpEcGGI2gChVj7vx1 I7k4H9NeQk1Ku5cd8VU2g1vPnmcIJyvZsalFYOONW2MP14Aw/oqybxWyqWGydJvMl954 Pjaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UDCLdEd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l18-20020a656812000000b005b3e61af56esi1508687pgt.121.2023.11.23.07.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:48:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UDCLdEd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DA52F826CB74; Thu, 23 Nov 2023 07:48:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346192AbjKWPr7 (ORCPT + 99 others); Thu, 23 Nov 2023 10:47:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346179AbjKWPr5 (ORCPT ); Thu, 23 Nov 2023 10:47:57 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A19EAC1; Thu, 23 Nov 2023 07:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1700754483; x=1732290483; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=CTX5KvvgdrTsg7p8OnAZgf7FxwGXh2z+Mhi27UJgJ4Q=; b=UDCLdEd+Bb6nwhBto1XjllUAqrvU1edxO9a+fExEnSLQW4lnN8EROI9l w6EQcyjtIwumKy8n+40IQ0djA7cxnw/V0I6zq5DUxr3GyikMKeZW+KxP6 eUezrO6fKtZcrg31SIf7tK1owY/P/FGA20SWN0wIdXOyjJLQ6+Tda0Pmn 1LdLG28qRMsP+eDq3ZwQ1YS77rmydFS1USI4PsBjsXkJ+P3iXep/N4Bxk S4HF2KC4trPGUFpr2czUAh2zAhNvRLdEcZDU8ZQunIUwkwsgJ9BfcQfRB sIG3tI2D9yh6V6xdNSf+qr86Drw/p4Fi5nCqdziJyFEEbzXohdo534tTR A==; X-CSE-ConnectionGUID: IbuvLynlSvKRjrA8ik4ZfQ== X-CSE-MsgGUID: J6IRFKNHRK2x6R8J40l5pw== X-IronPort-AV: E=Sophos;i="6.04,222,1695657600"; d="scan'208";a="3129197" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 23 Nov 2023 23:47:25 +0800 IronPort-SDR: yvlYE0fFMMVn3+OAAEFRErHaPTmuEQ5myLsYHxfF3iol+8AHdcUbmeGS89U5f4xQNA5TVkSzeu imaALadapih9KbA3Azcqzyj5SMOZDo4I6tcjV8RNCLAcVTmM/9PfkE0hALStEtqSd8kUpTQMbu JV5IOXhESeEnopnqo7pWqV3u1sDOiuuQNywsP7mtOkcbSyz6j+KPHQHSOGh3hzUefO6MVVsana nMQYv7ocbzXqtTrOxrD31ahou2zQ9YAG0LXZFJVpgeltfKza9r+HeHqi+yoeor7n+2uGzEB3nm J+0= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2023 06:58:41 -0800 IronPort-SDR: VlVTdledMOtlAk9w60uDMeGBo9FxlsO6K5T5qVN8bPQl8PugdQqlRiY00niArHMbtaAR7mxxJG 3z+iVAlMl4ffZzEG8fEcEvzivoLBSNPTcafCoIPFZztExKwHDQ8ojNjbN5bpSM363YvkfP41Wv cxHdd7/hZ/urSxenMq5r/CskSg52cr9h/Pvee1HYEwBUJhtDJRLzbpDT4eV702tJ6Ti8u1oA7T jP0Q5PF/zkOw0pu0lCTRzBCbBiRfDG9tNcbr2SIrSZyot2uFfeUz7GEVZt6m81CfJ+fvql98FX WUc= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 23 Nov 2023 07:47:24 -0800 From: Johannes Thumshirn Subject: [PATCH v2 0/5] btrfs: zoned: remove extent_buffer redirtying Date: Thu, 23 Nov 2023 07:47:14 -0800 Message-Id: <20231123-josef-generic-163-v2-0-ed1a79a8e51e@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAN0X2UC/22NQQrCMBBFr1Jm7UgmiZq68h7SRU0n7Qg2kkhVS u9uLLhz+T6892fInIQzHKsZEk+SJY4F9KYCP7RjzyhdYdBKGyKt8BozB+x5LJ5H2hsMtguW24v 2tYPi3RMHea3Nc1N4kPyI6b1eTPRdfzX6U5sIFSpbszmQ2zlLp2fntz7eoFmW5QNoHvc5sAAAA A== To: Chris Mason , Josef Bacik , David Sterba Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Naohiro Aota , Johannes Thumshirn X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700754443; l=1956; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=CTX5KvvgdrTsg7p8OnAZgf7FxwGXh2z+Mhi27UJgJ4Q=; b=+GlT1k7R+eeutsowVFxL6yS5MvlOHpSZVEv3B/yWnSKMMRTx6jtgIymMc/IrkRzr2O/rbECvR esX9BpccjubCXAj8GMFlhvzMXbti+8yFaVAWChYlXo38ExV9ZVMJhSV X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:48:19 -0800 (PST) Since the beginning of zoned mode, I've promised Josef to get rid of the extent_buffer redirtying, but never actually got around to doing so. Then 2 weeks ago our CI has hit an ASSERT() in this area and I started to look into it again. After some discussion with Christoph we came to the conclusion to finally take the time and get rid of the extent_buffer redirtying once and for all. Patch one renames EXTENT_BUFFER_NO_CHECK into EXTENT_BUFFER_ZONED_ZEROOUT, because this fits the new model somewhat better. Number two sets the cancel bit instead of clearing the dirty bit from a zoned extent_buffer. Number three removes the last remaining bits of btrfs_redirty_list_add(). The last two patches in this series are just trivial cleanups I came across while looking at the code. --- Changes in v2: - Rename EXTENT_BUFFER_CANCELLED to EXTENT_BUFFER_ZONED_ZEROOUT - Add comments why we're marking the buffer as zeroout and zero it. - Add Reviews from Josef and Christoph - Link to v1: https://lore.kernel.org/r/20231121-josef-generic-163-v1-0-049e37185841@wdc.com --- Johannes Thumshirn (5): btrfs: rename EXTENT_BUFFER_NO_CHECK to EXTENT_BUFFER_ZONED_ZEROOUT btrfs: zoned: don't clear dirty flag of extent buffer btrfs: remove now unneeded btrfs_redirty_list_add btrfs: use memset_page instead of opencoding it btrfs: reflow btrfs_free_tree_block fs/btrfs/disk-io.c | 9 ++++- fs/btrfs/extent-tree.c | 102 ++++++++++++++++++++++++------------------------- fs/btrfs/extent_io.c | 18 +++++++-- fs/btrfs/extent_io.h | 3 +- fs/btrfs/tree-log.c | 1 - fs/btrfs/zoned.c | 16 -------- fs/btrfs/zoned.h | 5 --- 7 files changed, 74 insertions(+), 80 deletions(-) --- base-commit: 592afe8e8b7ceee58107757fd29ff3290e6539e3 change-id: 20231120-josef-generic-163-f4df4eab2c98 Best regards, -- Johannes Thumshirn