public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems
@ 2014-02-05  8:46 Dave Chinner
  2014-02-07 17:47 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2014-02-05  8:46 UTC (permalink / raw)
  To: xfs

From: Dave Chinner <dchinner@redhat.com>

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@redhat.com>
---
 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
 
 _add_scratch_fstab
 _test_remount_rw
-- 
1.8.4.rc3

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

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

* Re: [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems
  2014-02-05  8:46 [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems Dave Chinner
@ 2014-02-07 17:47 ` Christoph Hellwig
  2014-02-10  1:52   ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2014-02-07 17:47 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Wed, Feb 05, 2014 at 07:46:40PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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@redhat.com>
> ---
>  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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems
  2014-02-07 17:47 ` Christoph Hellwig
@ 2014-02-10  1:52   ` Dave Chinner
  2014-02-10 10:45     ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2014-02-10  1:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Fri, Feb 07, 2014 at 09:47:54AM -0800, Christoph Hellwig wrote:
> On Wed, Feb 05, 2014 at 07:46:40PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > 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@redhat.com>
> > ---
> >  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?

No, that simply breaks old mkfs binaries.

> Alternatively this magic should move into a helper.

I'll roll it into a _requires_noattr2 helper.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

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

* Re: [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems
  2014-02-10  1:52   ` Dave Chinner
@ 2014-02-10 10:45     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2014-02-10 10:45 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, xfs

On Mon, Feb 10, 2014 at 12:52:00PM +1100, Dave Chinner wrote:
> > I really don't like opencoding this.  Shouldn't we instead simplfy
> > pass a nocrc argument to _scratch_mkfs_xfs?
> 
> No, that simply breaks old mkfs binaries.

Well, we couldn't pass it unconditionally - the main idea is to hide
the magic and allow tests to easily create a noncrc filesystem.

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

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

end of thread, other threads:[~2014-02-10 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  8:46 [PATCH] xfs/189: noattr2 invalid for CRC enabled filesystems Dave Chinner
2014-02-07 17:47 ` Christoph Hellwig
2014-02-10  1:52   ` Dave Chinner
2014-02-10 10:45     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox