public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/3 v2] Switch to on-stack variables for block reserves
Date: Wed,  4 Jun 2025 11:29:18 +0200	[thread overview]
Message-ID: <cover.1749029179.git.dsterba@suse.com> (raw)

The block reserve structure is small enough to fit on stack so do that
in a few functions and avoid allocation.

v2:
- drop patch replacing allocated reserve in relocation, crash in btrfs/190
- v1 https://lore.kernel.org/linux-btrfs/cover.1695408280.git.dsterba@suse.com/

David Sterba (3):
  btrfs: use on-stack variable for block reserve in btrfs_evict_inode()
  btrfs: use on-stack variable for block reserve in btrfs_truncate()
  btrfs: use on-stack variable for block reserve in
    btrfs_replace_file_extents()

 fs/btrfs/file.c  | 29 ++++++++++++-----------------
 fs/btrfs/inode.c | 47 ++++++++++++++++++++++-------------------------
 2 files changed, 34 insertions(+), 42 deletions(-)

-- 
2.47.1


             reply	other threads:[~2025-06-04  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04  9:29 David Sterba [this message]
2025-06-04  9:29 ` [PATCH 1/3] btrfs: use on-stack variable for block reserve in btrfs_evict_inode() David Sterba
2025-06-04  9:29 ` [PATCH 2/3] btrfs: use on-stack variable for block reserve in btrfs_truncate() David Sterba
2025-06-04  9:29 ` [PATCH 3/3] btrfs: use on-stack variable for block reserve in btrfs_replace_file_extents() David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1749029179.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox