btrfs: minor cleanup for subpage helpers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: remove NULL fs_info checks in subpage helpersfs/ | +8 | 0 replies | |
| 2/2 | btrfs: unify data and metadata subpage handlingfs/ fs/ | +33 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] btrfs: minor cleanup for subpage helpers
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(-)
Signature · 1 line
2.54.0