From: Anand Jain <anand.jain@oracle.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
fstests@vger.kernel.org
Subject: Re: [PATCH v4] generic/808: add a regression test for fiemap into an mmap range
Date: Thu, 21 Mar 2024 10:16:41 +0530 [thread overview]
Message-ID: <40b5f077-5e6b-43c5-9f8b-ee1d672f5617@oracle.com> (raw)
In-Reply-To: <dc1a90179b8de25340bd45f4e54cda8c3ab66398.1710949564.git.josef@toxicpanda.com>
On 3/20/24 21:16, Josef Bacik wrote:
> Btrfs had a deadlock that you could trigger by mmap'ing a large file and
> using that as the buffer for fiemap. This test adds a c program to do
> this, and the fstest creates a large enough file and then runs the
> reproducer on the file. Without the fix btrfs deadlocks, with the fix
> we pass fine.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> v3->v4:
> - Rework this to use punch-alternating to generate a fragmented file.
> - Rework the _require's to reflect the new mode of fragmenting a file.
>
> +# real QA test starts here
> +_supported_fs generic
> +_require_test
> +_require_test_program "fiemap-fault"
> +_require_test_program "punch-alternating"
> +_require_xfs_io_command "fpunch"
> +
> +dst=$TEST_DIR/$seq/fiemap-fault
> +
> +mkdir -p $TEST_DIR/$seq
> +
> +echo "Silence is golden"
> +
> +# Generate a file with lots of extents
> +blksz=$(_get_file_block_size $TEST_DIR)
> +$XFS_IO_PROG -f -c "pwrite -q 0 $((blksz * 10000))" $dst
> +$here/src/punch-alternating $dst
> +
> +# Now run the reproducer
> +$here/src/fiemap-fault $dst
> +
> +# success, all done
> +status=$?
> +exit
Reviewed-by: Anand Jain <anand.jain@oracle.com>
> +
A whitespace here, to be addressed during integration.
Thanks, Anand
> diff --git a/tests/generic/808.out b/tests/generic/808.out
> new file mode 100644
> index 00000000..88253428
> --- /dev/null
> +++ b/tests/generic/808.out
> @@ -0,0 +1,2 @@
> +QA output created by 808
> +Silence is golden
next prev parent reply other threads:[~2024-03-21 4:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 15:46 [PATCH v4] generic/808: add a regression test for fiemap into an mmap range Josef Bacik
2024-03-21 4:46 ` Anand Jain [this message]
2024-03-21 4:56 ` Darrick J. Wong
2024-03-21 5:43 ` 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=40b5f077-5e6b-43c5-9f8b-ee1d672f5617@oracle.com \
--to=anand.jain@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.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.