From patchwork Thu Sep 28 10:12:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13402436 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 3D1BECE7B17 for ; Thu, 28 Sep 2023 10:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbjI1KM5 (ORCPT ); Thu, 28 Sep 2023 06:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjI1KMz (ORCPT ); Thu, 28 Sep 2023 06:12:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C344122 for ; Thu, 28 Sep 2023 03:12:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A951C433C7 for ; Thu, 28 Sep 2023 10:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695895973; bh=Fts0Kbxtz7hMjFfZouz3RVXuHx55nj5nMTviSqCScQo=; h=From:To:Subject:Date:From; b=mS4tcARZAkddnAhfOhxPWa3MIGwT98zfJ7UD7YpnhVzm/HpN/1gLr4vEzLh9YQwBT iL7mqH26CeGWAMPtr7Ufi+erhKPiZOtIfsnNo8ST28WhM9pvViwPBHp0oNkKghV+Cm bW98YR52FZ4sfmSjiaEIjAgnl0JnJlSiCckQwmiuNyLFKKQJuKIY3CUx/kfea7wMdJ k+z6G8dhtzPfCSTKIYoOvFOl7AD5QQ3/MRECbD+mXiusB0MmdkLOQ3g9URODcbIbhG JHLHh7jm738+hAsGAap2bU/aPPifQ5eBBHAvARvuBWH0IrREhKluKBNR6+dHiJ/Dnw mVvZG7DOwV9tQ== From: fdmanana@kernel.org To: linux-btrfs@vger.kernel.org Subject: [PATCH 0/2] btrfs: adjust reservation sizes for block group item updates/inserts Date: Thu, 28 Sep 2023 11:12:48 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Filipe Manana The following patches adjust how we calculate the size for block group item insertions and updates, so that we stop reserving/accounting excessive space for these operations, specially when the free space tree is being used (a default nowadays). More details on the changelogs. Filipe Manana (2): btrfs: stop reserving excessive space for block group item updates btrfs: stop reserving excessive space for block group item insertions fs/btrfs/block-group.c | 17 +++++----- fs/btrfs/delayed-ref.c | 70 ++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/delayed-ref.h | 4 +++ fs/btrfs/disk-io.c | 2 +- fs/btrfs/transaction.c | 2 +- 5 files changed, 85 insertions(+), 10 deletions(-)