public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs: remove COW fixup and checked folio flag
@ 2026-04-14  1:16 Qu Wenruo
  2026-04-14  1:16 ` [PATCH v2 1/2] btrfs: remove the COW fixup mechanism Qu Wenruo
  2026-04-14  1:16 ` [PATCH v2 2/2] btrfs: remove folio checked subpage bitmap tracking Qu Wenruo
  0 siblings, 2 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-04-14  1:16 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-14  2:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14  1:16 [PATCH v2 0/2] btrfs: remove COW fixup and checked folio flag Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox