Skip to content

RFC btrfs: initial bs > ps support

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 9 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 9 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/9] btrfs: initial bs > ps support

This series enables the initial bs > ps support, with several limitations:

- No direct IO support
All direct IOs fall back to buffered ones.

- No RAID56 support
Any fs with RAID56 feature will be rejected at mount time.

- No encoded read/write/send
Encoded send will fallback to the regular send (reading from page cache).
Encoded read/write utilized by send/receive will fallback to regular ones.

Above limits are introduced by the fact that, we require large folios to cover at least one fs block, so that no block can cross large folio boundaries.

This simplifies our checksum and RAID56 handling.

The problem is, user space programs can only ensure their memory is properly aligned in virtual addresses, but have no control on the physical addresses. Thus they can got a contiguous memory but is backed by incontiguous pages.

In that case, it will break the "no block can cross large folio boundaries" assumption, and will need a very complex mechanism to handle checksum, especially for RAID56.

The same applies to encoded send, which uses vmallocated memory.

In the long run, we will need to support all those complex mechanism anyway.

- Still some instablity
Sometimes I can hit the ASSERT()s inside submit_one_sector() where we should not get an hole em.

Still debugging, so far it only occurs on multi-thread fsstress runs. Trying to get a smaller reproducer for this bug, but not an easy thing so far.

Maybe memory pressure is involved in this case, as the same seed + parameters can not reliably reproduce the ASSERT() reliably.

Qu Wenruo (8):
btrfs: prepare compression folio alloc/free for bs > ps cases
btrfs: prepare zstd to support bs > ps cases
btrfs: prepare lzo to support bs > ps cases
btrfs: prepare zlib to support bs > ps cases
btrfs: prepare scrub to support bs > ps cases
btrfs: fix symbolic link reading when bs > ps
btrfs: add extra ASSERT()s to catch unaligned bios
btrfs: enable experimental bs > ps support

 fs/btrfs/bio.c         | 27 +++++++++++++++++++
 fs/btrfs/compression.c | 42 ++++++++++++++++++++---------
 fs/btrfs/compression.h |  2 +-
 fs/btrfs/direct-io.c   | 12 +++++++++
 fs/btrfs/disk-io.c     | 14 ++++++++--
 fs/btrfs/extent_io.c   |  7 +++--
 fs/btrfs/extent_io.h   |  3 ++-
 fs/btrfs/fs.c          | 20 ++++++++++++--
 fs/btrfs/fs.h          |  6 +++++
 fs/btrfs/inode.c       | 18 +++++++------
 fs/btrfs/ioctl.c       | 35 +++++++++++++++++-------
 fs/btrfs/lzo.c         | 59 ++++++++++++++++++++++-------------------
 fs/btrfs/raid56.c      | 43 +++++++++++++++++++++---------
 fs/btrfs/raid56.h      |  4 +--
 fs/btrfs/scrub.c       | 51 +++++++++++++++++++----------------
 fs/btrfs/send.c        |  9 ++++++-
 fs/btrfs/zlib.c        | 60 +++++++++++++++++++++++++++---------------
 fs/btrfs/zstd.c        | 44 +++++++++++++++++--------------
 18 files changed, 313 insertions(+), 143 deletions(-)
Signature · 1 line
2.50.1