On Thu, Feb 08, 2018 at 11:04:29AM -0500, Brian Foster wrote: > The XFS rmapbt extent swap mechanism performs an extent by extent > swap to ensure the rmapbt is rectified with the appropriate extent > owner information after the operation. This implementation suffers > from a corner case that requires extra reservation if the swap > operation results in bouncing one of the associated inodes between > extent and btree formats. When this corner case occurs, it results > in a transaction block reservation overrun and possible corruption > of the free space accounting. > > This regression test provides coverage for this corner case. It > creates two files with a large enough extent count to require btree > format, regardless of inode size, and performs a sequence of extent > swaps between them with a decreasing extent count until all extents > are removed from the file(s). This ensures that one of the swaps > covers the btree <-> extent fork format boundary case. > > This test reproduces fs corruption on rmapbt enabled filesystems > running on kernels without the associated extent swap fix. > > Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --D -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html