All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support
@ 2015-07-22  8:22 Eryu Guan
  2015-07-22 15:22 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2015-07-22  8:22 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

This basically does the same as in commit

90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support

which left xfs/078 behind.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/xfs/078 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/078 b/tests/xfs/078
index 32436f7..0d6eb55 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -87,7 +87,11 @@ _grow_loop()
 	echo
 
 	echo "*** mkfs loop file (size=$original)"
-	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
+	mkfs_crc_opts="-m crc=0"
+	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
+		mkfs_crc_opts=""
+	fi
+	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
 		| _filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support
  2015-07-22  8:22 [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support Eryu Guan
@ 2015-07-22 15:22 ` Eric Sandeen
  2015-07-23  3:54   ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2015-07-22 15:22 UTC (permalink / raw)
  To: Eryu Guan, fstests

On 7/22/15 3:22 AM, Eryu Guan wrote:
> This basically does the same as in commit
> 
> 90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support
> 
> which left xfs/078 behind.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>

This is fine as far as it goes, but I think xfs/045 needs it too:


if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
    cat $tmp.out
    echo "!!! failed to mkfs on $SCRATCH_DEV"
    exit
fi

It fails "gracefully" but it doesn't need to, in this case.

In case I'm wrong, for this patch:

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

but xfs/045 might need a look too, either in this patch or a followup.

Thanks,
-Eric

> ---
>  tests/xfs/078 | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/078 b/tests/xfs/078
> index 32436f7..0d6eb55 100755
> --- a/tests/xfs/078
> +++ b/tests/xfs/078
> @@ -87,7 +87,11 @@ _grow_loop()
>  	echo
>  
>  	echo "*** mkfs loop file (size=$original)"
> -	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
> +	mkfs_crc_opts="-m crc=0"
> +	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
> +		mkfs_crc_opts=""
> +	fi
> +	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
>  		| _filter_mkfs 2>/dev/null
>  
>  	echo "*** extend loop file"
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support
  2015-07-22 15:22 ` Eric Sandeen
@ 2015-07-23  3:54   ` Eryu Guan
  2015-07-23  3:56     ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2015-07-23  3:54 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

On Wed, Jul 22, 2015 at 10:22:56AM -0500, Eric Sandeen wrote:
> On 7/22/15 3:22 AM, Eryu Guan wrote:
> > This basically does the same as in commit
> > 
> > 90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support
> > 
> > which left xfs/078 behind.
> > 
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> 
> This is fine as far as it goes, but I think xfs/045 needs it too:
> 
> 
> if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
> then
>     cat $tmp.out
>     echo "!!! failed to mkfs on $SCRATCH_DEV"
>     exit
> fi
> 
> It fails "gracefully" but it doesn't need to, in this case.

xfs/045 passed on my RHEL6 test box, I think that's because xfs/045 (and
some other tests) takes use of _scratch_mkfs_xfs not call $MKFS_XFS_PROG
directly, so commit 90a3bfc takes care of all the dirty work.

Thanks for the review!

Eryu
> 
> In case I'm wrong, for this patch:
> 
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> 
> but xfs/045 might need a look too, either in this patch or a followup.
> 
> Thanks,
> -Eric
> 
> > ---
> >  tests/xfs/078 | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/xfs/078 b/tests/xfs/078
> > index 32436f7..0d6eb55 100755
> > --- a/tests/xfs/078
> > +++ b/tests/xfs/078
> > @@ -87,7 +87,11 @@ _grow_loop()
> >  	echo
> >  
> >  	echo "*** mkfs loop file (size=$original)"
> > -	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
> > +	mkfs_crc_opts="-m crc=0"
> > +	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
> > +		mkfs_crc_opts=""
> > +	fi
> > +	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
> >  		| _filter_mkfs 2>/dev/null
> >  
> >  	echo "*** extend loop file"
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support
  2015-07-23  3:54   ` Eryu Guan
@ 2015-07-23  3:56     ` Eric Sandeen
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2015-07-23  3:56 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On 7/22/15 10:54 PM, Eryu Guan wrote:
> On Wed, Jul 22, 2015 at 10:22:56AM -0500, Eric Sandeen wrote:
>> On 7/22/15 3:22 AM, Eryu Guan wrote:
>>> This basically does the same as in commit
>>>
>>> 90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support
>>>
>>> which left xfs/078 behind.
>>>
>>> Signed-off-by: Eryu Guan <eguan@redhat.com>
>>
>> This is fine as far as it goes, but I think xfs/045 needs it too:
>>
>>
>> if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
>> then
>>     cat $tmp.out
>>     echo "!!! failed to mkfs on $SCRATCH_DEV"
>>     exit
>> fi
>>
>> It fails "gracefully" but it doesn't need to, in this case.
> 
> xfs/045 passed on my RHEL6 test box, I think that's because xfs/045 (and
> some other tests) takes use of _scratch_mkfs_xfs not call $MKFS_XFS_PROG
> directly, so commit 90a3bfc takes care of all the dirty work.
> 
> Thanks for the review!

Oh, you are right ... how did I miss that it's calling _scratch_mkfs_xfs,
I'm sorry!

Yes, your patch is fine, and complete.  Oops! :)

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-23  3:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22  8:22 [PATCH] xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support Eryu Guan
2015-07-22 15:22 ` Eric Sandeen
2015-07-23  3:54   ` Eryu Guan
2015-07-23  3:56     ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.