All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/15] btrfs: support read-write for subpage metadata
@ 2021-03-10  9:08 Qu Wenruo
  2021-03-10  9:08 ` [PATCH v2 01/15] btrfs: add sysfs interface for supported sectorsize Qu Wenruo
                   ` (14 more replies)
  0 siblings, 15 replies; 25+ messages in thread
From: Qu Wenruo @ 2021-03-10  9:08 UTC (permalink / raw)
  To: linux-btrfs

This patchset can be fetched from the following github repo, along with
the full subpage RW support:
https://github.com/adam900710/linux/tree/subpage

This patchset is for metadata read write support.

[FULL RW TEST]
Since the data write path is not included in this patchset, we can't
really test the patchset itself, but anyone can grab the patch from
github repo and do fstests/generic tests.

There are some known issues:
- Very very rare random ASSERT() failure for data page::private
  It looks like we can lock a data page without page::private set for
  subpage.
  This problem seems to be caused some set_page_extent_mapped() callers
  are not holding the page locked, thus leaving a small window.
  Investigating.

- Defrag related test failure
  Since current defrag is doing per-page defrag, to support subpage
  defrag, we need some change in the loop.
  Thus for now, defrag is disabled completely for subpage RW mount.

- No compression support yet
  There are at least 2 known bugs if forcing compression for subpage
  * Some hard coded PAGE_SIZE screwing up space rsv
  * Subpage ASSERT() triggered
    This is because some compression code is unlocking locked_page by
    calling extent_clear_unlock_delalloc() with locked_page == NULL.
  So for now compression is also disabled.

[DIFFERENCE AGAINST REGULAR SECTORSIZE]
The metadata part in fact has more new code than data part, as it has
some different behaviors compared to the regular sector size handling:

- No more page locking
  Now metadata read/write relies on extent io tree locking, other than
  page locking.
  This is to allow behaviors like read lock one eb while also try to
  read lock another eb in the same page.
  We can't rely on page lock as now we have multiple extent buffers in
  the same page.

- Page status update
  Now we use subpage wrappers to handle page status update.

- How to submit dirty extent buffers
  Instead of just grabbing extent buffer from page::private, we need to
  iterate all dirty extent buffers in the page and submit them.

[CHANGELOG]
v2:
- Rebased to latest misc-next
  No conflicts at all.

- Add new sysfs interface to grab supported RO/RW sectorsize
  This will allow mkfs.btrfs to detect unmountable fs better.

- Use newer naming schema for each patch
  No more "extent_io:" or "inode:" schema anymore.

- Move two pure cleanups to the series
  Patch 2~3, originally in RW part.

- Fix one uninitialized variable
  Patch 6.

Qu Wenruo (15):
  btrfs: add sysfs interface for supported sectorsize
  btrfs: use min() to replace open-code in btrfs_invalidatepage()
  btrfs: remove unnecessary variable shadowing in btrfs_invalidatepage()
  btrfs: introduce helpers for subpage dirty status
  btrfs: introduce helpers for subpage writeback status
  btrfs: allow btree_set_page_dirty() to do more sanity check on subpage
    metadata
  btrfs: support subpage metadata csum calculation at write time
  btrfs: make alloc_extent_buffer() check subpage dirty bitmap
  btrfs: make the page uptodate assert to be subpage compatible
  btrfs: make set/clear_extent_buffer_dirty() to be subpage compatible
  btrfs: make set_btree_ioerr() accept extent buffer and to be subpage
    compatible
  btrfs: introduce end_bio_subpage_eb_writepage() function
  btrfs: introduce write_one_subpage_eb() function
  btrfs: make lock_extent_buffer_for_io() to be subpage compatible
  btrfs: introduce submit_eb_subpage() to submit a subpage metadata page

 fs/btrfs/disk-io.c   | 143 +++++++++++----
 fs/btrfs/extent_io.c | 420 ++++++++++++++++++++++++++++++++++++-------
 fs/btrfs/inode.c     |  14 +-
 fs/btrfs/subpage.c   |  73 ++++++++
 fs/btrfs/subpage.h   |  17 ++
 fs/btrfs/sysfs.c     |  34 ++++
 6 files changed, 598 insertions(+), 103 deletions(-)

-- 
2.30.1


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

end of thread, other threads:[~2021-03-16 10:29 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  9:08 [PATCH v2 00/15] btrfs: support read-write for subpage metadata Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 01/15] btrfs: add sysfs interface for supported sectorsize Qu Wenruo
2021-03-15 11:59   ` Anand Jain
2021-03-15 12:39     ` Qu Wenruo
2021-03-15 18:44       ` David Sterba
2021-03-16  0:05         ` Qu Wenruo
2021-03-16  0:10           ` Anand Jain
2021-03-16 10:25             ` David Sterba
2021-03-16 10:27           ` David Sterba
2021-03-10  9:08 ` [PATCH v2 02/15] btrfs: use min() to replace open-code in btrfs_invalidatepage() Qu Wenruo
2021-03-15 12:03   ` Anand Jain
2021-03-10  9:08 ` [PATCH v2 03/15] btrfs: remove unnecessary variable shadowing " Qu Wenruo
2021-03-15 12:06   ` Anand Jain
2021-03-10  9:08 ` [PATCH v2 04/15] btrfs: introduce helpers for subpage dirty status Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 05/15] btrfs: introduce helpers for subpage writeback status Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 06/15] btrfs: allow btree_set_page_dirty() to do more sanity check on subpage metadata Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 07/15] btrfs: support subpage metadata csum calculation at write time Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 08/15] btrfs: make alloc_extent_buffer() check subpage dirty bitmap Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 09/15] btrfs: make the page uptodate assert to be subpage compatible Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 10/15] btrfs: make set/clear_extent_buffer_dirty() " Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 11/15] btrfs: make set_btree_ioerr() accept extent buffer and " Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 12/15] btrfs: introduce end_bio_subpage_eb_writepage() function Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 13/15] btrfs: introduce write_one_subpage_eb() function Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 14/15] btrfs: make lock_extent_buffer_for_io() to be subpage compatible Qu Wenruo
2021-03-10  9:08 ` [PATCH v2 15/15] btrfs: introduce submit_eb_subpage() to submit a subpage metadata page Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.