Thread (52 messages) 52 messages, 5 authors, 2021-02-04

Re: [PATCH v5 00/18] btrfs: add read-only support for subpage sector size

From: David Sterba <hidden>
Date: 2021-02-01 15:58:26

On Tue, Jan 26, 2021 at 04:33:44PM +0800, Qu Wenruo wrote:
Patches can be fetched from github:
https://github.com/adam900710/linux/tree/subpage
Currently the branch also contains partial RW data support (still some
ordered extent and data csum mismatch problems)

Great thanks to David/Nikolay/Josef for their effort reviewing and
merging the preparation patches into misc-next.

=== What works ===
Just from the patchset:
- Data read
  Both regular and compressed data, with csum check.

- Metadata read

This means, with these patchset, 64K page systems can at least mount
btrfs with 4K sector size read-only.
This should provide the ability to migrate data at least.

While on the github branch, there are already experimental RW supports,
there are still ordered extent related bugs for me to fix.
Thus only the RO part is sent for review and testing.

=== Patchset structure ===
Patch 01~02:	Preparation patches which don't have functional change
Patch 03~12:	Subpage metadata allocation and freeing
Patch 13~15:	Subpage metadata read path
Patch 16~17:	Subpage data read path
Patch 18:	Enable subpage RO support
v5:
- Use the updated version from David as base
  Most comment/commit message update should be kept as is.

- A new separate patch to move UNMAPPED bit set timing

- New comment on why we need to prealloc subpage inside a loop
  Mostly for further 16K page size support, where we can have
  eb across multiple pages.

- Remove one patch which is too RW specific
  Since it introduces functional change which only makes sense for RW
  support, it's not a good idea to include it in RO support.

- Error handling fixes
  Great thanks to Josef.

- Refactor btrfs_subpage allocation/freeing
  Now we have btrfs_alloc_subpage() and btrfs_free_subpage() helpers to
  do all the allocation/freeing.
  It's pretty easy to convert to kmem_cache using above helpers.
  (already internally tested using kmem_cache without problem, in fact
   it's all the problems found in kmem_cache test leads to the new
   interface)

- Use btrfs_subpage::eb_refs to replace old under_alloc
  This makes checking whether the page has any eb left much easier.
All look reasonable for merge, patch 17 still needs an update that'll
replace once you send it.

I'll move it to misc-next after fstests finish, minor updates are still
possible during this week, merge window freeze is approaching.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help