From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: support 2k block size for debug builds
Date: Wed, 26 Feb 2025 14:40:19 +1030 [thread overview]
Message-ID: <cover.1740542375.git.wqu@suse.com> (raw)
[REPO]
This series depends on the existing subpage related patches to pass most
fstests, so please fetch it from the following repo:
https://github.com/adam900710/linux/tree/2k_blocksize
Of course, one can still apply those involved patches on for-next
branch, but running such btrfs with 2K block size are going to hit most
if not all bugs fixed in the subpage branch.
From day 1 btrfs only supports block size as small as 4K, this means on
the most common architecture, x86_64, has no way to test subpage block
size support.
That's why most of my tests are done on aarch64 nowadays, but such
limited availability is not a good thing for test coverage.
The situation can be improved if we have larger data folios support, but
that is another huge feature, and we're not sure how far away we really
are.
So here we go with a much simpler solution, just lowering the minimal
block size to 2K for debug builds.
The support has quite some limitations, but should not be a big deal
because we're not pushing this support to end users:
- No 2K node size support
This is the limit by mkfs, not by the kernel.
But it's still a problem as this means we can not test the metadata
subpage routine.
- No mixed block groups support
As there is no 2K node size support from mkfs.btrfs.
- Very limited inline data extents support
No inline extent size can go beyond 2K, this affects both regular
files and symlinks/xattrs.
Quite some inline related test will fail due to this.
This allows x86_64 to utilize the subpage block size routine, and in
fact it already exposed a bug that is not reproducible on aarch64.
(I believe it's related to the page reclaim behavior)
The first patch is to fix the deadlock that is only reproducible on
x86_64.
The second one is to fix btrfs-check errors that non-compressed block
sized inline extents are reported as an error.
The final one enables the 2K block size support for DEBUG builds.
For now there are around a dozen of failed test cases, mostly related to
inline and mkfs limitations, but this is good enough as the beginning of
subpage testing on x86_64.
Qu Wenruo (3):
btrfs: subpage: do not hold subpage spin lock when clearing folio
writeback
btrfs: properly limit inline data extent according to block size
btrfs: allow debug builds to accept 2K block size
fs/btrfs/disk-io.c | 12 +++++++++---
fs/btrfs/fs.h | 12 ++++++++++++
fs/btrfs/inode.c | 14 +++++++++++++-
fs/btrfs/subpage.c | 10 ++++++++--
fs/btrfs/subpage.h | 2 +-
fs/btrfs/sysfs.c | 3 ++-
6 files changed, 45 insertions(+), 8 deletions(-)
--
2.48.1
next reply other threads:[~2025-02-26 4:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 4:10 Qu Wenruo [this message]
2025-02-26 4:10 ` [PATCH 1/3] btrfs: subpage: do not hold subpage spin lock when clearing folio writeback Qu Wenruo
2025-02-26 4:10 ` [PATCH 2/3] btrfs: properly limit inline data extent according to block size Qu Wenruo
2025-02-26 4:10 ` [PATCH 3/3] btrfs: allow debug builds to accept 2K " Qu Wenruo
2025-02-28 14:19 ` [PATCH 0/3] btrfs: support 2k block size for debug builds David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1740542375.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.