Re: [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems

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

 



On Wed, Feb 05, 2014 at 07:46:40PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Version 5 filesystems always have attr2 format enabled, and it
> cannot be turned off via the noattr2 mount option. As such, attempts
> to mount with noattr2 will be rejected and this causes cascading
> failures within the test.
> 
> Hence detect if we've created a CRC enabled filesystem, and if this
> is the case _notrun the test.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  tests/xfs/189 | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/189 b/tests/xfs/189
> index 27bfb63..addf7ce 100755
> --- a/tests/xfs/189
> +++ b/tests/xfs/189
> @@ -241,7 +241,16 @@ _require_scratch
>  unset SCRATCH_RTDEV
>  unset SCRATCH_LOGDEV
>  
> -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs | _filter_mkfs 2> $tmp.mkfs
> +
> +# check to see if we've made a CRC enabled filesystem. If so,
> +# we can't run the test because CRc enabled filesystems don't support
> +# noattr2 mount options and this will cause cascading failures that are
> +# impossible to filter.
> +. $tmp.mkfs
> +if [ $crc -eq 1 ]; then
> +	_notrun "Filesystem CRCs enabled, noattr2 is not supported."
> +fi

I really don't like opencoding this.  Shouldn't we instead simplfy
pass a nocrc argument to _scratch_mkfs_xfs?

Alternatively this magic should move into a helper.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux