From: Disha Goel <disgoel@linux.ibm.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Zorro Lang <zlang@redhat.com>,
fstests@vger.kernel.org
Cc: Ritesh Harjani <ritesh.list@gmail.com>,
djwong@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] generic/365: Fix false failure when mapping ends with free space
Date: Thu, 21 Aug 2025 16:35:28 +0530 [thread overview]
Message-ID: <7f52f3ad-ad01-4337-be3a-eb281e319b24@linux.ibm.com> (raw)
In-Reply-To: <cc80fdb62151d677809f2eb36eadebd3720c8701.1754385487.git.ojaswin@linux.ibm.com>
On 05/08/25 2:55 pm, Ojaswin Mujoo wrote:
> If we have a small FS where the first free space mapping is also the
> last mapping of the FS, then the following sub-test fails:
>
> echo "test whatever came after freesp"
> $XFS_IO_PROG -c "fsmap -d $((freesp_end + 2)) $((freesp_end + 3))" $SCRATCH_MNT
>
> since there is nothing after the freespace. Fix this by punching a 1M
> hole in a 3M file to ensure that the first free space is always
> surrounded by allocated blocks.
>
> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
I tested the patch on Power, and it resolves the test failures with a
64k block size.
Tested-by: Disha Goel <disgoel@linux.ibm.com>
SECTION -- ext4_64k
RECREATING -- ext4 on /dev/loop0
FSTYP -- ext4
PLATFORM -- Linux/ppc64le localhost 6.17.0-rc2-00060-g068a56e56fa8
#2 SMP Thu Aug 21 16:28:18 IST 2025
MKFS_OPTIONS -- -F -b 65536 /dev/loop1
MOUNT_OPTIONS -- -o block_validity /dev/loop1 /mnt/scratch
generic/365 1s ... 1s
Ran: generic/365
Passed all 1 tests
> ---
> tests/generic/365 | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/generic/365 b/tests/generic/365
> index 36cb2530..bbadae71 100755
> --- a/tests/generic/365
> +++ b/tests/generic/365
> @@ -32,6 +32,10 @@ if ((blksz < 2048)); then
> _notrun "test requires at least 4 bblocks per fsblock"
> fi
>
> +# This makes sure there is free space surrounded by allocated blocks, which
> +# is needed for some sub tests.
> +$XFS_IO_PROG -fc 'falloc 0 3M' -c 'fpunch 1M 1M' -c 'fsync' $SCRATCH_MNT/f
> +
> $XFS_IO_PROG -c 'fsmap' $SCRATCH_MNT >> $seqres.full
>
> find_freesp() {
next prev parent reply other threads:[~2025-08-21 11:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 9:25 Ojaswin Mujoo
2025-08-21 11:05 ` Disha Goel [this message]
2025-08-25 15:29 ` Zorro Lang
2025-08-28 15:00 ` Ojaswin Mujoo
2025-08-29 17:09 ` Zorro Lang
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=7f52f3ad-ad01-4337-be3a-eb281e319b24@linux.ibm.com \
--to=disgoel@linux.ibm.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=zlang@redhat.com \
/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
all inboxes | Powered by JetHome®