Re: [PATCH 1/2] common/xfs: skip xfs_check unless the test runner forces us to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 31, 2021 at 05:11:16PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> At long last I've completed my quest to ensure that every corruption
> found by xfs_check can also be found by xfs_repair.  Since xfs_check
> uses more memory than repair and has long been obsolete, let's stop
> running it automatically from _check_xfs_filesystem unless the test
> runner makes us do it.
> 
> Tests that explicitly want xfs_check can call it via _scratch_xfs_check
> or _xfs_check; that part doesn't go away.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  README     |    4 ++++
>  common/xfs |   12 ++++++++----
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> 
> diff --git a/README b/README
> index 84c217ce..63f0641a 100644
> --- a/README
> +++ b/README
> @@ -125,6 +125,10 @@ Preparing system for tests:
>  	       time we should try a patient module remove. The default is 50
>  	       seconds. Set this to "forever" and we'll wait forever until the
>  	       module is gone.
> +             - Set FORCE_XFS_CHECK_PROG=yes to have _check_xfs_filesystem run
> +               xfs_check to check the filesystem.  As of August 2021,
> +               xfs_repair finds all filesystem corruptions found by xfs_check,
> +               and more, which means that xfs_check is no longer run by default.
>  
>          - or add a case to the switch in common/config assigning
>            these variables based on the hostname of your test
> diff --git a/common/xfs b/common/xfs
> index c5e39427..bfb1bf1e 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -595,10 +595,14 @@ _check_xfs_filesystem()
>  		ok=0
>  	fi
>  
> -	# xfs_check runs out of memory on large files, so even providing the test
> -	# option (-t) to avoid indexing the free space trees doesn't make it pass on
> -	# large filesystems. Avoid it.
> -	if [ "$LARGE_SCRATCH_DEV" != yes ]; then
> +	# xfs_check runs out of memory on large files, so even providing the
> +	# test option (-t) to avoid indexing the free space trees doesn't make
> +	# it pass on large filesystems. Avoid it.
> +	#
> +	# As of August 2021, xfs_repair completely supersedes xfs_check's
> +	# ability to find corruptions, so we no longer run xfs_check unless
> +	# forced to run it.

I have to say I've waited for this change long time :-D

Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

> +	if [ "$LARGE_SCRATCH_DEV" != yes ] && [ "$FORCE_XFS_CHECK_PROG" = "yes" ]; then
>  		_xfs_check $extra_log_options $device 2>&1 > $tmp.fs_check
>  	fi
>  	if [ -s $tmp.fs_check ]; then
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux