From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: enhancement to pass generic/563
Date: Wed, 12 Feb 2025 13:22:44 +1030 [thread overview]
Message-ID: <cover.1739328504.git.wqu@suse.com> (raw)
[CHANGELOG]
v2:
- Rebased to the latest for-next branch
There is a data corruption read fix, which changed the timing of
btrfs_lock_and_flush_ordered_range().
- Introduce a dedicated and smarted, read path speific extent range lock
helper, lock_extents_for_read()
Which has all the extra subpage specific deadlock avoiding mechanism,
along with a much better comments on which type of ordered extents
needs to be waited, and which can be completely skipped.
The test case generic/563 on aarch64 with 64K page size and 4K fs block
size will fail with btrfs, but not EXT4 nor XFS.
The detailed reason is explained in the last patch, the TL;DR is that
btrfs is not handling block aligned buffered write in an optimized way
for subpage cases (block size < page size).
The first patch is to address the deadlock-prone
btrfs_lock_and_flush_ordered_range() in read paths, by introduce a
deadlock-avoiding helper for read paths.
The second patch is a refactor in preparation for the new enhancement.
Eventually the last patch will enable the enhancement and pass the
generic/563.
Qu Wenruo (3):
btrfs: introduce a read path dedicated extent lock helper
btrfs: make btrfs_do_readpage() to do block-by-block read
btrfs: allow buffered write to avoid full page read if it's block
aligned
fs/btrfs/defrag.c | 2 +-
fs/btrfs/direct-io.c | 2 +-
fs/btrfs/extent_io.c | 224 +++++++++++++++++++++++++++++++++++-----
fs/btrfs/file.c | 9 +-
fs/btrfs/inode.c | 4 +-
fs/btrfs/ordered-data.c | 29 ++++--
fs/btrfs/ordered-data.h | 3 +-
7 files changed, 229 insertions(+), 44 deletions(-)
--
2.48.1
next reply other threads:[~2025-02-12 2:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 2:52 Qu Wenruo [this message]
2025-02-12 2:52 ` [PATCH v2 1/3] btrfs: introduce a read path dedicated extent lock helper Qu Wenruo
2025-02-25 13:00 ` David Sterba
2025-02-26 0:04 ` Qu Wenruo
2025-02-12 2:52 ` [PATCH v2 2/3] btrfs: make btrfs_do_readpage() to do block-by-block read Qu Wenruo
2025-02-25 13:04 ` David Sterba
2025-02-12 2:52 ` [PATCH v2 3/3] btrfs: allow buffered write to avoid full page read if it's block aligned Qu Wenruo
2025-02-25 13:05 ` 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.1739328504.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox