On 2022/11/30 6:06, Darrick J. Wong wrote:
From: Darrick J. Wong<djwong@xxxxxxxxxx> 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.
Hi Darrick, Cool, it is reliable to reproduce the same issue in non-DAX mode. Reviewed-by: Xiao Yang <yangx.jy@xxxxxxxxxxx> Tested-by: Xiao Yang <yangx.jy@xxxxxxxxxxx> Best Regards, Xiao Yang