All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-16 11:53 ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 11:53 UTC (permalink / raw)
  To: fstests; +Cc: xfs, Eryu Guan

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

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

diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..909231b 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -61,6 +61,11 @@ _filter_path()
 	sed -e "s,$1,<MNTPATH>,g" | LC_COLLATE=POSIX sort
 }
 
+filter_finobt_warn()
+{
+	sed -e "s/warning: finobt .*without CRC.*disabled.//"
+}
+
 _populate_scratch()
 {
 	POSIXLY_CORRECT=yes \
@@ -138,7 +143,8 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 2>&1 | filter_finobt_warn | \
+	_filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0


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

* [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-16 11:53 ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 11:53 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan, xfs

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

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

diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..909231b 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -61,6 +61,11 @@ _filter_path()
 	sed -e "s,$1,<MNTPATH>,g" | LC_COLLATE=POSIX sort
 }
 
+filter_finobt_warn()
+{
+	sed -e "s/warning: finobt .*without CRC.*disabled.//"
+}
+
 _populate_scratch()
 {
 	POSIXLY_CORRECT=yes \
@@ -138,7 +143,8 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 2>&1 | filter_finobt_warn | \
+	_filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0

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

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
  2016-03-16 11:53 ` Eryu Guan
@ 2016-03-16 12:04   ` Christoph Hellwig
  -1 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2016-03-16 12:04 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, xfs

On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> due to extra warning about disabling finobt feature:
> 
>  +warning: finobt not supported without CRC support, disabled.
> 
> Because xfs/073 disables crc unconditionally and finobt can not be
> enabled either.

How about explicitly disabling finobt as well?

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-16 12:04   ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2016-03-16 12:04 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, xfs

On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> due to extra warning about disabling finobt feature:
> 
>  +warning: finobt not supported without CRC support, disabled.
> 
> Because xfs/073 disables crc unconditionally and finobt can not be
> enabled either.

How about explicitly disabling finobt as well?

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

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
  2016-03-16 12:04   ` Christoph Hellwig
@ 2016-03-16 14:54     ` Eryu Guan
  -1 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 14:54 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: fstests, xfs

On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > due to extra warning about disabling finobt feature:
> > 
> >  +warning: finobt not supported without CRC support, disabled.
> > 
> > Because xfs/073 disables crc unconditionally and finobt can not be
> > enabled either.
> 
> How about explicitly disabling finobt as well?

I think that's a cleaner way to fix it. Just that some extra work is
needed to let the test pass with old mkfs.xfs without metadata suport.

Will send v2 shortly. Thanks for the review!

Eryu

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-16 14:54     ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 14:54 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: fstests, xfs

On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > due to extra warning about disabling finobt feature:
> > 
> >  +warning: finobt not supported without CRC support, disabled.
> > 
> > Because xfs/073 disables crc unconditionally and finobt can not be
> > enabled either.
> 
> How about explicitly disabling finobt as well?

I think that's a cleaner way to fix it. Just that some extra work is
needed to let the test pass with old mkfs.xfs without metadata suport.

Will send v2 shortly. Thanks for the review!

Eryu

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

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

* [PATCH v2] xfs/073: avoid finobt warning from mkfs
  2016-03-16 11:53 ` Eryu Guan
@ 2016-03-16 15:04   ` Eryu Guan
  -1 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 15:04 UTC (permalink / raw)
  To: fstests; +Cc: xfs, Eryu Guan

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

Fix it by explicitly disabling finobt as well.

Also remove all meta related mkfs options in _scratch_mkfs_xfs_opts() if
mkfs.xfs has no metadata support, not only the crc option. So that test
still passes on distros with such old binaries.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---

v2:
- disable finobt explicitly, instead of filtering the warning

 common/rc     | 4 ++--
 tests/xfs/073 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index a34c387..73d2ea6 100644
--- a/common/rc
+++ b/common/rc
@@ -444,9 +444,9 @@ _scratch_mkfs_xfs_opts()
 {
 	mkfs_opts=$*
 
-	# remove crc related mkfs options if mkfs.xfs doesn't support v5 xfs
+	# remove metadata related mkfs options if mkfs.xfs doesn't them
 	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+crc=.//"`
+		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
 	fi
 
 	_scratch_options mkfs
diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..e2c1af3 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -138,7 +138,7 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0,finobt=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0


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

* [PATCH v2] xfs/073: avoid finobt warning from mkfs
@ 2016-03-16 15:04   ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-16 15:04 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan, xfs

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

Fix it by explicitly disabling finobt as well.

Also remove all meta related mkfs options in _scratch_mkfs_xfs_opts() if
mkfs.xfs has no metadata support, not only the crc option. So that test
still passes on distros with such old binaries.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---

v2:
- disable finobt explicitly, instead of filtering the warning

 common/rc     | 4 ++--
 tests/xfs/073 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index a34c387..73d2ea6 100644
--- a/common/rc
+++ b/common/rc
@@ -444,9 +444,9 @@ _scratch_mkfs_xfs_opts()
 {
 	mkfs_opts=$*
 
-	# remove crc related mkfs options if mkfs.xfs doesn't support v5 xfs
+	# remove metadata related mkfs options if mkfs.xfs doesn't them
 	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+crc=.//"`
+		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
 	fi
 
 	_scratch_options mkfs
diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..e2c1af3 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -138,7 +138,7 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0,finobt=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0

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

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
  2016-03-16 14:54     ` Eryu Guan
@ 2016-03-16 20:00       ` Dave Chinner
  -1 siblings, 0 replies; 12+ messages in thread
From: Dave Chinner @ 2016-03-16 20:00 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Christoph Hellwig, fstests, xfs

On Wed, Mar 16, 2016 at 10:54:18PM +0800, Eryu Guan wrote:
> On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> > On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > > due to extra warning about disabling finobt feature:
> > > 
> > >  +warning: finobt not supported without CRC support, disabled.
> > > 
> > > Because xfs/073 disables crc unconditionally and finobt can not be
> > > enabled either.
> > 
> > How about explicitly disabling finobt as well?
> 
> I think that's a cleaner way to fix it. Just that some extra work is
> needed to let the test pass with old mkfs.xfs without metadata suport.

This is a downhill slope. e.g. if I add "-i sparse=1" to the mkfs
line, it will warning differently and a new filter is needed. I
would suggest just ignoring the mkfs output altogether (maybe just
dumping it all to $seqres.full) as it's not necessary to determine
whether the test ran correctly or not.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-16 20:00       ` Dave Chinner
  0 siblings, 0 replies; 12+ messages in thread
From: Dave Chinner @ 2016-03-16 20:00 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Christoph Hellwig, fstests, xfs

On Wed, Mar 16, 2016 at 10:54:18PM +0800, Eryu Guan wrote:
> On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> > On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > > due to extra warning about disabling finobt feature:
> > > 
> > >  +warning: finobt not supported without CRC support, disabled.
> > > 
> > > Because xfs/073 disables crc unconditionally and finobt can not be
> > > enabled either.
> > 
> > How about explicitly disabling finobt as well?
> 
> I think that's a cleaner way to fix it. Just that some extra work is
> needed to let the test pass with old mkfs.xfs without metadata suport.

This is a downhill slope. e.g. if I add "-i sparse=1" to the mkfs
line, it will warning differently and a new filter is needed. I
would suggest just ignoring the mkfs output altogether (maybe just
dumping it all to $seqres.full) as it's not necessary to determine
whether the test ran correctly or not.

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] 12+ messages in thread

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
  2016-03-16 20:00       ` Dave Chinner
@ 2016-03-17  3:28         ` Eryu Guan
  -1 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-17  3:28 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, fstests, xfs

On Thu, Mar 17, 2016 at 07:00:43AM +1100, Dave Chinner wrote:
> On Wed, Mar 16, 2016 at 10:54:18PM +0800, Eryu Guan wrote:
> > On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> > > On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > > > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > > > due to extra warning about disabling finobt feature:
> > > > 
> > > >  +warning: finobt not supported without CRC support, disabled.
> > > > 
> > > > Because xfs/073 disables crc unconditionally and finobt can not be
> > > > enabled either.
> > > 
> > > How about explicitly disabling finobt as well?
> > 
> > I think that's a cleaner way to fix it. Just that some extra work is
> > needed to let the test pass with old mkfs.xfs without metadata suport.
> 
> This is a downhill slope. e.g. if I add "-i sparse=1" to the mkfs
> line, it will warning differently and a new filter is needed. I
> would suggest just ignoring the mkfs output altogether (maybe just
> dumping it all to $seqres.full) as it's not necessary to determine
> whether the test ran correctly or not.

Yes, other tests that call _scratch_mkfs_xfs with explicit "-m crc=0"
all redirect output to null or $seqres.full, so I only see the warning
in xfs/073. I'd like to do the same for it.

I think the update to _scratch_mkfs_xfs_opts() in v2 patch is still
worth doing, it belongs to a seperate patch though.

Thanks,
Eryu

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

* Re: [PATCH] xfs/073: filter out finobt warning from mkfs.xfs
@ 2016-03-17  3:28         ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-17  3:28 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, fstests, xfs

On Thu, Mar 17, 2016 at 07:00:43AM +1100, Dave Chinner wrote:
> On Wed, Mar 16, 2016 at 10:54:18PM +0800, Eryu Guan wrote:
> > On Wed, Mar 16, 2016 at 05:04:16AM -0700, Christoph Hellwig wrote:
> > > On Wed, Mar 16, 2016 at 07:53:24PM +0800, Eryu Guan wrote:
> > > > When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
> > > > due to extra warning about disabling finobt feature:
> > > > 
> > > >  +warning: finobt not supported without CRC support, disabled.
> > > > 
> > > > Because xfs/073 disables crc unconditionally and finobt can not be
> > > > enabled either.
> > > 
> > > How about explicitly disabling finobt as well?
> > 
> > I think that's a cleaner way to fix it. Just that some extra work is
> > needed to let the test pass with old mkfs.xfs without metadata suport.
> 
> This is a downhill slope. e.g. if I add "-i sparse=1" to the mkfs
> line, it will warning differently and a new filter is needed. I
> would suggest just ignoring the mkfs output altogether (maybe just
> dumping it all to $seqres.full) as it's not necessary to determine
> whether the test ran correctly or not.

Yes, other tests that call _scratch_mkfs_xfs with explicit "-m crc=0"
all redirect output to null or $seqres.full, so I only see the warning
in xfs/073. I'd like to do the same for it.

I think the update to _scratch_mkfs_xfs_opts() in v2 patch is still
worth doing, it belongs to a seperate patch though.

Thanks,
Eryu

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

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

end of thread, other threads:[~2016-03-17  3:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-16 11:53 [PATCH] xfs/073: filter out finobt warning from mkfs.xfs Eryu Guan
2016-03-16 11:53 ` Eryu Guan
2016-03-16 12:04 ` Christoph Hellwig
2016-03-16 12:04   ` Christoph Hellwig
2016-03-16 14:54   ` Eryu Guan
2016-03-16 14:54     ` Eryu Guan
2016-03-16 20:00     ` Dave Chinner
2016-03-16 20:00       ` Dave Chinner
2016-03-17  3:28       ` Eryu Guan
2016-03-17  3:28         ` Eryu Guan
2016-03-16 15:04 ` [PATCH v2] xfs/073: avoid finobt warning from mkfs Eryu Guan
2016-03-16 15:04   ` Eryu Guan

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.