Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: minor cleanup for subpage helpers
@ 2026-08-07  9:38 Qu Wenruo
  2026-08-07  9:38 ` [PATCH 1/2] btrfs: remove NULL fs_info checks in " Qu Wenruo
  2026-08-07  9:38 ` [PATCH 2/2] btrfs: unify data and metadata subpage handling Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-08-07  9:38 UTC (permalink / raw)
  To: linux-btrfs

The first patch removes dead "unlikely(!fs_info)" checks, as commit
b2136cc288fc ("btrfs: tests: allocate dummy fs_info and root in
test_find_delalloc()") has properly allocated a dummy fs_info for
extent-io-tests.

The second patch is inspired by Boris' new cow fixup, where we can
determine if a folio belongs to data or metadata.
As the only special case is when the folio has no mapping. Meanwhile for
data folios they are always from page cache, thus they are always
mapped.
So an unmapped folio must belongs to metadata, for dummy ebs.

This allows us to enhance btrfs_is_subpage() to cover both data and
metadata, now btrfs_meta_folio_*() helpers are just a simple wrapper for
the correponding btrfs_folio_*() helpers.

Qu Wenruo (2):
  btrfs: remove NULL fs_info checks in subpage helpers
  btrfs: unify data and metadata subpage handling

 fs/btrfs/subpage.c | 50 +++++++++-------------------------------------
 fs/btrfs/subpage.h | 45 +++++++++++++++++++++++++++++------------
 2 files changed, 41 insertions(+), 54 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-08-07  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  9:38 [PATCH 0/2] btrfs: minor cleanup for subpage helpers Qu Wenruo
2026-08-07  9:38 ` [PATCH 1/2] btrfs: remove NULL fs_info checks in " Qu Wenruo
2026-08-07  9:38 ` [PATCH 2/2] btrfs: unify data and metadata subpage handling Qu Wenruo

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