From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH] xfs/179: modify test to trigger refcount update bugs
Date: Wed, 30 Nov 2022 09:42:27 +1100 [thread overview]
Message-ID: <20221129224227.GL3600936@dread.disaster.area> (raw)
In-Reply-To: <Y4aCb+y2ej1TBE/R@magnolia>
On Tue, Nov 29, 2022 at 02:06:39PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Upon enabling fsdax + reflink for XFS, this test began to report
> refcount metadata corruptions after being run. Specifically, xfs_repair
> noticed single-block refcount records that could be combined but had not
> been.
>
> The root cause of this is improper MAXREFCOUNT edge case handling in
> xfs_refcount_merge_extents. When we're trying to find candidates for a
> record merge, we compute the refcount of the merged record, but without
> accounting for the fact that once a record hits rc_refcount ==
> MAXREFCOUNT, it is pinned that way forever.
>
> Adjust this test to use a sub-filesize write for one of the COW writes,
> because this is how we force the extent merge code to run.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Seems like a reasonable modification to the test....
> ---
> tests/xfs/179 | 28 +++++++++++++++++++++++++---
> 1 file changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/tests/xfs/179 b/tests/xfs/179
> index ec0cb7e5b4..214558f694 100755
> --- a/tests/xfs/179
> +++ b/tests/xfs/179
> @@ -21,17 +21,28 @@ _require_scratch_nocheck
> _require_cp_reflink
> _require_test_program "punch-alternating"
>
> +_fixed_by_kernel_commit XXXXXXXXXXXX "xfs: estimate post-merge refcounts correctly"
Though I really don't like these annotation because when the test
fails in future as I'm developing new code it's going to tell me I
need a fix I already have in the kernel. This is just extra noise
that I have to filter out of the results output. IMO a comment for
this information or a line in the commit message is fine - it
just doesn't belong in the test output....
Other than that:
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-11-29 22:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 22:01 [PATCHSET 0/2] xfs: fix broken MAXREFCOUNT handling Darrick J. Wong
2022-11-29 22:01 ` [PATCH 1/2] xfs: hoist refcount record merge predicates Darrick J. Wong
2022-11-29 22:35 ` Dave Chinner
2022-11-30 0:13 ` Darrick J. Wong
2022-11-30 9:24 ` Yang, Xiao/杨 晓
2022-11-29 22:01 ` [PATCH 2/2] xfs: estimate post-merge refcounts correctly Darrick J. Wong
2022-11-29 22:37 ` Dave Chinner
2022-11-30 9:32 ` Yang, Xiao/杨 晓
2022-11-30 18:49 ` Darrick J. Wong
2022-11-29 22:06 ` [RFC PATCH] xfs/179: modify test to trigger refcount update bugs Darrick J. Wong
2022-11-29 22:42 ` Dave Chinner [this message]
2022-11-30 0:19 ` Darrick J. Wong
2022-11-30 10:07 ` Yang, Xiao/杨 晓
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=20221129224227.GL3600936@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@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