From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs: remove COW fixup and checked folio flag
Date: Tue, 14 Apr 2026 10:46:40 +0930 [thread overview]
Message-ID: <cover.1776129347.git.wqu@suse.com> (raw)
Changelog:
v2:
- Also remove the fixup worker
- Slightly reword the cover letter
- Remove COW fixup related comments
- Update Kconfig to reflect this change.
For experimental builds we're already rejecting dirty folios which
don't have ordered flags since v6.15.
Unfortunately we're not yet removing that COW fixup machanism for
non-experimental builds even at v7.0, as we can still trigger the
warning when we detect dirty folios without ordered extents.
So far all those problems only happen when errors are injected into the
IO path, e.g. generic/475, and I haven't yet seen it triggered without
error handling.
Although I prefer to remove the COW fixup after all error handling
problems are fixed, I run out of ideas how those cases can happen, and
the current handling of treating such cases as write errors is not
going to make things any worse anyway.
Furthermore for the future of huge folios (order 9, 2M page on 4K page
size systems), we can not afford the extra bitmap for a huge folio.
In that case, a huge folio will need 64 bytes per bitmap, which is no
longer a small amount.
I believe it's time to remove the COW fixup mechanism even for
non-experimental builds, along with the checked folio flags.
Qu Wenruo (2):
btrfs: remove the COW fixup mechanism
btrfs: remove folio checked subpage bitmap tracking
fs/btrfs/Kconfig | 4 -
fs/btrfs/defrag.c | 1 -
fs/btrfs/disk-io.c | 16 +--
fs/btrfs/extent_io.c | 12 +--
fs/btrfs/file.c | 12 +--
fs/btrfs/free-space-cache.c | 4 -
fs/btrfs/fs.h | 7 --
fs/btrfs/inode.c | 205 +++---------------------------------
fs/btrfs/reflink.c | 1 -
fs/btrfs/subpage.c | 39 +------
fs/btrfs/subpage.h | 5 +-
11 files changed, 21 insertions(+), 285 deletions(-)
--
2.53.0
next reply other threads:[~2026-04-14 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 1:16 Qu Wenruo [this message]
2026-04-14 1:16 ` [PATCH v2 1/2] btrfs: remove the COW fixup mechanism Qu Wenruo
2026-04-14 2:14 ` David Sterba
2026-04-14 1:16 ` [PATCH v2 2/2] btrfs: remove folio checked subpage bitmap tracking Qu Wenruo
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.1776129347.git.wqu@suse.com \
--to=wqu@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