From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/4] btrfs-progs: convert: fix the invalid regular extents for symbol links
Date: Tue, 3 Sep 2024 16:58:58 +0930 [thread overview]
Message-ID: <cover.1725348299.git.wqu@suse.com> (raw)
Test case btrfs/012 fails randomly after the rework to use fsstress to
populate the fs.
It turns out that, if fsstress creates a symbol link whose target is
4095 bytes (at the max size limit), btrfs-convert will create a regular
extent instead of the expected inline one.
This regular extent for symbol link inodes will be rejected by kernel,
resulting test case failure.
The reason that btrfs-convert created such regular extent is,
btrfs-convert accidentally added one byte for the terminating NUL,
enlarge the should-be inlined file extent to be a regular one.
The first patch will fix the bug.
Then two patches to enahnce btrfs-check to detect the error (regular and
lowmem mode)
Eventually a dedicated test case for btrfs-convert, so in the future we
won't cause the problem again.
Qu Wenruo (4):
btrfs-progs: convert: fix inline extent size for symbol link
btrfs-progs: check/original: detect invalid file extent items for
symbol links
btrfs-progs: check/lowmem: detect invalid file extents for symbol
links
btrfs-progs: convert-tests: add a test case to verify large symbol
link handling
check/main.c | 7 +++
check/mode-lowmem.c | 44 +++++++++++++++++++
convert/source-ext2.c | 12 +++--
convert/source-reiserfs.c | 4 +-
kernel-shared/file-item.c | 3 ++
.../027-large-symbol-link/test.sh | 33 ++++++++++++++
6 files changed, 98 insertions(+), 5 deletions(-)
create mode 100755 tests/convert-tests/027-large-symbol-link/test.sh
--
2.46.0
next reply other threads:[~2024-09-03 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 7:28 Qu Wenruo [this message]
2024-09-03 7:28 ` [PATCH 1/4] btrfs-progs: convert: fix inline extent size for symbol link Qu Wenruo
2024-09-03 7:29 ` [PATCH 2/4] btrfs-progs: check/original: detect invalid file extent items for symbol links Qu Wenruo
2024-09-03 7:29 ` [PATCH 3/4] btrfs-progs: check/lowmem: detect invalid file extents " Qu Wenruo
2024-09-03 7:29 ` [PATCH 4/4] btrfs-progs: convert-tests: add a test case to verify large symbol link handling Qu Wenruo
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.1725348299.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.