From: Ismael Luceno <ismael@iodev.co.uk>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.com>,
Chris Mason <mason@kernel.org>,
linux-kernel@vger.kernel.org, Qu Wenruo <wqu@suse.com>,
Anand Jain <asj@kernel.org>, Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH 0/6] btrfs: trim unused space when relocating data extents
Date: Mon, 30 Nov 2026 02:20:02 +0100 [thread overview]
Message-ID: <20261130022002.541bd6d5@pirotess> (raw)
In-Reply-To: <945b0a58-b806-4f97-a685-70387235b9c8@gmx.com>
On Mon, 30 Nov 2026 07:30:17 +1030
Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
> 在 2026/11/30 00:01, Ismael Luceno 写道:
> > A data balance copies every data extent whole, including bytes that
> > no file references. Those dead bytes stay allocated, and an
> > overwritten file keeps its old extents until every reference to
> > them is gone.
> >
> > This series copies only the referenced bytes. For each old extent,
> > the referenced ranges are collected and laid out in one new
> > allocation, and each file extent is remapped to its own range. Dead
> > bytes are not copied, so they are freed with the old block group.
>
> Won't this introduce extra backref walk during relocation?
> That can be very expensive for heavily shared data extents, meanwhile
> may even not result any space saving.
The data copy seems to always dominate, I couldn't measure any
meaningful difference.
I'm looking into how to optimise this, though.
> But sashiko is already reporting 9 high level problems and 11 medium
> level bugs, I think you would like to get them addressed.
I'll look at it and make a new submission.
Thanks!
next prev parent reply other threads:[~2026-11-30 1:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 13:31 [PATCH 0/6] btrfs: trim unused space when relocating data extents Ismael Luceno
2026-11-29 13:31 ` [PATCH 1/6] btrfs: add prealloc helper for sharing one allocation Ismael Luceno
2026-11-29 13:31 ` [PATCH 2/6] btrfs: allow NOCOW writeback into data relocation extents Ismael Luceno
2026-11-29 13:31 ` [PATCH 3/6] btrfs: relocate only referenced bytes of a data extent Ismael Luceno
2026-11-29 13:31 ` [PATCH 4/6] btrfs: scan the running transaction for data extent references Ismael Luceno
2026-11-29 13:31 ` [PATCH 5/6] btrfs: retry a block group that references survive the update stage Ismael Luceno
2026-11-29 13:31 ` [PATCH 6/6] btrfs: derive relocation group length from its members Ismael Luceno
2026-11-29 21:00 ` [PATCH 0/6] btrfs: trim unused space when relocating data extents Qu Wenruo
2026-11-30 1:20 ` Ismael Luceno [this message]
2026-11-30 4:43 ` Qu Wenruo
2026-11-30 6:52 ` Zygo Blaxell
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=20261130022002.541bd6d5@pirotess \
--to=ismael@iodev.co.uk \
--cc=asj@kernel.org \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.