All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type
@ 2017-07-12 18:31 Bill O'Donnell
  2017-07-12 19:02 ` Eric Sandeen
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-12 18:31 UTC (permalink / raw)
  To: fstests; +Cc: eguan

xfs_db should take sector size into account when setting type.
If sector size ignored, a false crc error can occur due to
the new size not being picked up when type gets set. This test
checks for that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
 tests/xfs/424     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |  5 ++++
 tests/xfs/group   |  1 +
 3 files changed, 78 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..12945678
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,72 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take sector size into account when setting type.
+# If sector size ignored, a false crc error can occur due to
+# the new size not being picked up when type is set. This test
+# checks for that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+_scratch_unmount >> $seqres.full 2>&1
+
+# for different sector sizes, ensure no CRC errors are falsely reported
+$MKFS_PROG -t xfs -f -s size=512 $SCRATCH_DEV > /dev/null
+$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 2" -c "type agi" $SCRATCH_DEV
+
+$MKFS_PROG -t xfs -f -s size=1024 $SCRATCH_DEV > /dev/null
+$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 4" -c "type agi" $SCRATCH_DEV
+
+$MKFS_PROG -t xfs -f -s size=2048 $SCRATCH_DEV > /dev/null
+$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 8" -c "type agi" $SCRATCH_DEV
+
+$MKFS_PROG -t xfs -f -s size=4096 $SCRATCH_DEV > /dev/null
+$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 16" -c "type agi" $SCRATCH_DEV
+
+# Modify as appropriate.
+_supported_fs generic
+_supported_os Linux
+_require_test
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..ff12d9d0
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1,5 @@
+QA output created by 424
+current daddr is 2
+current daddr is 4
+current daddr is 8
+current daddr is 16
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.0


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

* Re: [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
@ 2017-07-12 19:02 ` Eric Sandeen
  2017-07-14 14:27 ` [PATCH] xfs/424: test xfs_db to ensure type " Bill O'Donnell
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Eric Sandeen @ 2017-07-12 19:02 UTC (permalink / raw)
  To: Bill O'Donnell, fstests; +Cc: eguan



On 07/12/2017 01:31 PM, Bill O'Donnell wrote:
> xfs_db should take sector size into account when setting type.

type size.  Sector size just happens to influence some type sizes.

> If sector size ignored, a false crc error can occur due to
> the new size not being picked up when type gets set. This test
> checks for that false crc error.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> ---
>  tests/xfs/424     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/424.out |  5 ++++
>  tests/xfs/group   |  1 +
>  3 files changed, 78 insertions(+)
>  create mode 100755 tests/xfs/424
>  create mode 100644 tests/xfs/424.out
> 
> diff --git a/tests/xfs/424 b/tests/xfs/424
> new file mode 100755
> index 00000000..12945678
> --- /dev/null
> +++ b/tests/xfs/424
> @@ -0,0 +1,72 @@
> +#! /bin/bash
> +# FS QA Test 424
> +#
> +# xfs_db should take sector size into account when setting type.
> +# If sector size ignored, a false crc error can occur due to
> +# the new size not being picked up when type is set. This test
> +# checks for that false crc error.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $tmp.*
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# real QA test starts here
> +_scratch_unmount >> $seqres.full 2>&1

Scratch should be unmounted already, maybe it's ok to be defensive.

> +
> +# for different sector sizes, ensure no CRC errors are falsely reported
> +$MKFS_PROG -t xfs -f -s size=512 $SCRATCH_DEV > /dev/null

Could also just use $MKFS_XFS_PROG, but *shrug*

> +$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 2" -c "type agi" $SCRATCH_DEV

While it's probably safe in this instance, because:

#define XFS_AGI_DADDR(mp)       ((xfs_daddr_t)(2 << (mp)->m_sectbb_log))

hardcoding the agi 0 location feels a little fragile.  If this were testing various types,
it would be safest to do i.e. "agf 0; daddr" and collect the computed disk address, then
set it back to the daddr reported by db...

> +ack"daddr" -c "daddr 42" -c "daddr 4" -c "type agi" $SCRATCH_DEV
> +
> +$MKFS_PROG -t xfs -f -s size=2048 $SCRATCH_DEV > /dev/null
> +$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 8" -c "type agi" $SCRATCH_DEV
> +
> +$MKFS_PROG -t xfs -f -s size=4096 $SCRATCH_DEV > /dev/null
> +$XFS_DB_PROG -c "agi 0" -c "daddr" -c "daddr 42" -c "daddr 16" -c "type agi" $SCRATCH_DEV

Is it sufficient to only test agi types?

> +
> +# Modify as appropriate.

Surely all the requirements should  go prior to the actual testing above?
> +_supported_fs generic

I doubt that this works on generic filesystems.  xfs, right?

> +_supported_os Linux
> +_require_test

why do you need a test dev?  On the other hand, you /do/ need a scratch dev ...

thanks,
-eric


> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> new file mode 100644
> index 00000000..ff12d9d0
> --- /dev/null
> +++ b/tests/xfs/424.out
> @@ -0,0 +1,5 @@
> +QA output created by 424
> +current daddr is 2
> +current daddr is 4
> +current daddr is 8
> +current daddr is 16
> diff --git a/tests/xfs/group b/tests/xfs/group
> index ffdb0615..75c8280c 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -421,3 +421,4 @@
>  421 auto quick clone dedupe
>  422 dangerous_scrub dangerous_online_repair
>  423 dangerous_scrub
> +424 auto quick db
> 

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

* [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
  2017-07-12 19:02 ` Eric Sandeen
@ 2017-07-14 14:27 ` Bill O'Donnell
  2017-07-14 15:42   ` Eric Sandeen
  2017-07-17 18:53 ` [PATCH v3] " Bill O'Donnell
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-14 14:27 UTC (permalink / raw)
  To: fstests

xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
v2: Clarify commit message and test comments. Add a few more test cases.

 tests/xfs/424     | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |  1 +
 tests/xfs/group   |  1 +
 3 files changed, 79 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..3b67cdf2
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,77 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take type size into account when setting type.
+# If type size isn't updated whenever type is set, a false crc
+# error can occur due to the stale size. This test checks for
+# that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+_filter_dbval()
+{
+    awk '{ print $4 }'
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# Modify as appropriate
+_supported_os Linux
+_require_scratch
+
+# real QA test starts here
+_scratch_unmount >> $seqres.full 2>&1
+
+# for different sector sizes, ensure no CRC errors are falsely reported
+
+# Supported types include: agf, agfl, agi, attr3, bmapbta,
+# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
+# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
+# For various sector sizes, test some types that involve type size.
+for SECTOR_SIZE in 512 1024 2048 4096; do
+    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
+    for TYPE in agf agi agfl sb; do
+	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
+	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
+    done
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..d879a949
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1 @@
+QA output created by 424
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.0


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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 14:27 ` [PATCH] xfs/424: test xfs_db to ensure type " Bill O'Donnell
@ 2017-07-14 15:42   ` Eric Sandeen
  2017-07-14 16:47     ` Bill O'Donnell
  2017-07-14 17:39     ` Darrick J. Wong
  0 siblings, 2 replies; 20+ messages in thread
From: Eric Sandeen @ 2017-07-14 15:42 UTC (permalink / raw)
  To: Bill O'Donnell, fstests



On 07/14/2017 09:27 AM, Bill O'Donnell wrote:
> xfs_db should take type size into account when setting type.
> If type size isn't updated whenever type is set, a false crc
> error can occur due to the stale size. This test checks for
> that false crc error.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> ---
> v2: Clarify commit message and test comments. Add a few more test cases.
> 
>  tests/xfs/424     | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/424.out |  1 +
>  tests/xfs/group   |  1 +
>  3 files changed, 79 insertions(+)
>  create mode 100755 tests/xfs/424
>  create mode 100644 tests/xfs/424.out
> 
> diff --git a/tests/xfs/424 b/tests/xfs/424
> new file mode 100755
> index 00000000..3b67cdf2
> --- /dev/null
> +++ b/tests/xfs/424
> @@ -0,0 +1,77 @@
> +#! /bin/bash
> +# FS QA Test 424
> +#
> +# xfs_db should take type size into account when setting type.
> +# If type size isn't updated whenever type is set, a false crc
> +# error can occur due to the stale size. This test checks for
> +# that false crc error.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $tmp.*
> +}
> +
> +_filter_dbval()
> +{
> +    awk '{ print $4 }'
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# Modify as appropriate
> +_supported_os Linux

_supported_fs xfs

> +_require_scratch
> +
> +# real QA test starts here
> +_scratch_unmount >> $seqres.full 2>&1
> +
> +# for different sector sizes, ensure no CRC errors are falsely reported
> +
> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.

This leaves me wondering why we don't test most of the above ;)

> +# For various sector sizes, test some types that involve type size.
> +for SECTOR_SIZE in 512 1024 2048 4096; do
> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> +    for TYPE in agf agi agfl sb; do
> +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV

Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?

Interesting, I didn't know that a bare "agf" works, but it does (and is documented
as such).  fair enough.

It'd be very easy to add just a few more types to this, i.e.:  (leaving the extra
 type & daddr setting in place for now)

DADDR=`$XFS_DB_PROG -c "sb" -c "addr rootino" -c "daddr" $SCRATCH_DEV | _filter_dbval`
$XFS_DB_PROG -c "type inode" -c "daddr 42" -c "daddr $DADDR" -c "type inode" $SCRATCH_DEV

DADDR=`$XFS_DB_PROG -c "agf" -c "addr bnoroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
$XFS_DB_PROG -c "type bnobt" -c "daddr 42" -c "daddr $DADDR" -c "type bnobt" $SCRATCH_DEV

DADDR=`$XFS_DB_PROG -c "agf" -c "addr cntroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
$XFS_DB_PROG -c "type cntbt" -c "daddr 42" -c "daddr $DADDR" -c "type cntbt" $SCRATCH_DEV

DADDR=`$XFS_DB_PROG -c "agi" -c "addr root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
$XFS_DB_PROG -c "type inobt" -c "daddr 42" -c "daddr $DADDR" -c "type inobt" $SCRATCH_DEV

DADDR=`$XFS_DB_PROG -c "agi" -c "addr free_root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
$XFS_DB_PROG -c "type finobt" -c "daddr 42" -c "daddr $DADDR" -c "type finobt" $SCRATCH_DEV

others such as attr, dir, symlink would require more filesystem preparation I guess.

Thanks,
-Eric

> +    done
> +done
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> new file mode 100644
> index 00000000..d879a949
> --- /dev/null
> +++ b/tests/xfs/424.out
> @@ -0,0 +1 @@
> +QA output created by 424
> diff --git a/tests/xfs/group b/tests/xfs/group
> index ffdb0615..75c8280c 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -421,3 +421,4 @@
>  421 auto quick clone dedupe
>  422 dangerous_scrub dangerous_online_repair
>  423 dangerous_scrub
> +424 auto quick db
> 

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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 15:42   ` Eric Sandeen
@ 2017-07-14 16:47     ` Bill O'Donnell
  2017-07-14 19:01       ` Eric Sandeen
  2017-07-14 17:39     ` Darrick J. Wong
  1 sibling, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-14 16:47 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:
> 
> 
> On 07/14/2017 09:27 AM, Bill O'Donnell wrote:
> > xfs_db should take type size into account when setting type.
> > If type size isn't updated whenever type is set, a false crc
> > error can occur due to the stale size. This test checks for
> > that false crc error.
> > 
> > Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> > ---
> > v2: Clarify commit message and test comments. Add a few more test cases.
> > 
> >  tests/xfs/424     | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/424.out |  1 +
> >  tests/xfs/group   |  1 +
> >  3 files changed, 79 insertions(+)
> >  create mode 100755 tests/xfs/424
> >  create mode 100644 tests/xfs/424.out
> > 
> > diff --git a/tests/xfs/424 b/tests/xfs/424
> > new file mode 100755
> > index 00000000..3b67cdf2
> > --- /dev/null
> > +++ b/tests/xfs/424
> > @@ -0,0 +1,77 @@
> > +#! /bin/bash
> > +# FS QA Test 424
> > +#
> > +# xfs_db should take type size into account when setting type.
> > +# If type size isn't updated whenever type is set, a false crc
> > +# error can occur due to the stale size. This test checks for
> > +# that false crc error.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1	# failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > +	cd /
> > +	rm -f $tmp.*
> > +}
> > +
> > +_filter_dbval()
> > +{
> > +    awk '{ print $4 }'
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# Modify as appropriate
> > +_supported_os Linux
> 
> _supported_fs xfs
> 
> > +_require_scratch
> > +
> > +# real QA test starts here
> > +_scratch_unmount >> $seqres.full 2>&1
> > +
> > +# for different sector sizes, ensure no CRC errors are falsely reported
> > +
> > +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> > +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> > +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> 
> This leaves me wondering why we don't test most of the above ;)
> 
> > +# For various sector sizes, test some types that involve type size.
> > +for SECTOR_SIZE in 512 1024 2048 4096; do
> > +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> > +    for TYPE in agf agi agfl sb; do
> > +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> > +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
> 
> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
It's drawn from the reproducer test case.
The first "-c $TYPE" sets the object, "daddr 42" is an arbitrary address set. Without
the daddr change and change-back, the test will pass even without the recent xfs_db
xfsprogs change.

> 
> Interesting, I didn't know that a bare "agf" works, but it does (and is documented
> as such).  fair enough.
> 
> It'd be very easy to add just a few more types to this, i.e.:  (leaving the extra
>  type & daddr setting in place for now)

ok. I'll add a few more.

> 
> DADDR=`$XFS_DB_PROG -c "sb" -c "addr rootino" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type inode" -c "daddr 42" -c "daddr $DADDR" -c "type inode" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agf" -c "addr bnoroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type bnobt" -c "daddr 42" -c "daddr $DADDR" -c "type bnobt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agf" -c "addr cntroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type cntbt" -c "daddr 42" -c "daddr $DADDR" -c "type cntbt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agi" -c "addr root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type inobt" -c "daddr 42" -c "daddr $DADDR" -c "type inobt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agi" -c "addr free_root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type finobt" -c "daddr 42" -c "daddr $DADDR" -c "type finobt" $SCRATCH_DEV
> 
> others such as attr, dir, symlink would require more filesystem preparation I guess.
> 
> Thanks,
> -Eric
> 
> > +    done
> > +done
> > +
> > +# success, all done
> > +status=0
> > +exit
> > diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> > new file mode 100644
> > index 00000000..d879a949
> > --- /dev/null
> > +++ b/tests/xfs/424.out
> > @@ -0,0 +1 @@
> > +QA output created by 424
> > diff --git a/tests/xfs/group b/tests/xfs/group
> > index ffdb0615..75c8280c 100644
> > --- a/tests/xfs/group
> > +++ b/tests/xfs/group
> > @@ -421,3 +421,4 @@
> >  421 auto quick clone dedupe
> >  422 dangerous_scrub dangerous_online_repair
> >  423 dangerous_scrub
> > +424 auto quick db
> > 

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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 15:42   ` Eric Sandeen
  2017-07-14 16:47     ` Bill O'Donnell
@ 2017-07-14 17:39     ` Darrick J. Wong
  1 sibling, 0 replies; 20+ messages in thread
From: Darrick J. Wong @ 2017-07-14 17:39 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Bill O'Donnell, fstests

On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:
> 
> 
> On 07/14/2017 09:27 AM, Bill O'Donnell wrote:
> > xfs_db should take type size into account when setting type.
> > If type size isn't updated whenever type is set, a false crc
> > error can occur due to the stale size. This test checks for
> > that false crc error.
> > 
> > Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> > ---
> > v2: Clarify commit message and test comments. Add a few more test cases.
> > 
> >  tests/xfs/424     | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/424.out |  1 +
> >  tests/xfs/group   |  1 +
> >  3 files changed, 79 insertions(+)
> >  create mode 100755 tests/xfs/424
> >  create mode 100644 tests/xfs/424.out
> > 
> > diff --git a/tests/xfs/424 b/tests/xfs/424
> > new file mode 100755
> > index 00000000..3b67cdf2
> > --- /dev/null
> > +++ b/tests/xfs/424
> > @@ -0,0 +1,77 @@
> > +#! /bin/bash
> > +# FS QA Test 424
> > +#
> > +# xfs_db should take type size into account when setting type.
> > +# If type size isn't updated whenever type is set, a false crc
> > +# error can occur due to the stale size. This test checks for
> > +# that false crc error.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1	# failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > +	cd /
> > +	rm -f $tmp.*
> > +}
> > +
> > +_filter_dbval()
> > +{
> > +    awk '{ print $4 }'
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# Modify as appropriate
> > +_supported_os Linux
> 
> _supported_fs xfs
> 
> > +_require_scratch
> > +
> > +# real QA test starts here
> > +_scratch_unmount >> $seqres.full 2>&1
> > +
> > +# for different sector sizes, ensure no CRC errors are falsely reported
> > +
> > +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> > +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> > +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> 
> This leaves me wondering why we don't test most of the above ;)

Same here.

> > +# For various sector sizes, test some types that involve type size.
> > +for SECTOR_SIZE in 512 1024 2048 4096; do
> > +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> > +    for TYPE in agf agi agfl sb; do
> > +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> > +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
> 
> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
> 
> Interesting, I didn't know that a bare "agf" works, but it does (and is documented
> as such).  fair enough.
> 
> It'd be very easy to add just a few more types to this, i.e.:  (leaving the extra
>  type & daddr setting in place for now)
> 
> DADDR=`$XFS_DB_PROG -c "sb" -c "addr rootino" -c "daddr" $SCRATCH_DEV | _filter_dbval`

/me wonders if this ought to be wrapped up into a helper ala
_scratch_xfs_get_metadata_field in common/fuzzy?

> $XFS_DB_PROG -c "type inode" -c "daddr 42" -c "daddr $DADDR" -c "type inode" $SCRATCH_DEV

_scratch_xfs_db, not $XFS_DB_PROG...$SCRATCH_DEV, or else this won't
work with fses with external logs.

> DADDR=`$XFS_DB_PROG -c "agf" -c "addr bnoroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type bnobt" -c "daddr 42" -c "daddr $DADDR" -c "type bnobt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agf" -c "addr cntroot" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type cntbt" -c "daddr 42" -c "daddr $DADDR" -c "type cntbt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agi" -c "addr root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type inobt" -c "daddr 42" -c "daddr $DADDR" -c "type inobt" $SCRATCH_DEV
> 
> DADDR=`$XFS_DB_PROG -c "agi" -c "addr free_root" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> $XFS_DB_PROG -c "type finobt" -c "daddr 42" -c "daddr $DADDR" -c "type finobt" $SCRATCH_DEV
> 
> others such as attr, dir, symlink would require more filesystem preparation I guess.

_scratch_populate_cached?

--D

> 
> Thanks,
> -Eric
> 
> > +    done
> > +done
> > +
> > +# success, all done
> > +status=0
> > +exit
> > diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> > new file mode 100644
> > index 00000000..d879a949
> > --- /dev/null
> > +++ b/tests/xfs/424.out
> > @@ -0,0 +1 @@
> > +QA output created by 424
> > diff --git a/tests/xfs/group b/tests/xfs/group
> > index ffdb0615..75c8280c 100644
> > --- a/tests/xfs/group
> > +++ b/tests/xfs/group
> > @@ -421,3 +421,4 @@
> >  421 auto quick clone dedupe
> >  422 dangerous_scrub dangerous_online_repair
> >  423 dangerous_scrub
> > +424 auto quick db
> > 
> --
> 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] 20+ messages in thread

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 16:47     ` Bill O'Donnell
@ 2017-07-14 19:01       ` Eric Sandeen
  2017-07-14 19:11         ` Bill O'Donnell
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Sandeen @ 2017-07-14 19:01 UTC (permalink / raw)
  To: Bill O'Donnell; +Cc: fstests



On 07/14/2017 11:47 AM, Bill O'Donnell wrote:
> On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:


>>> +# for different sector sizes, ensure no CRC errors are falsely reported
>>> +
>>> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
>>> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
>>> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
>>
>> This leaves me wondering why we don't test most of the above ;)
>>
>>> +# For various sector sizes, test some types that involve type size.
>>> +for SECTOR_SIZE in 512 1024 2048 4096; do
>>> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
>>> +    for TYPE in agf agi agfl sb; do
>>> +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
>>> +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
>>
>> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
> It's drawn from the reproducer test case.
> The first "-c $TYPE" sets the object, "daddr 42" is an arbitrary address set. Without
> the daddr change and change-back, the test will pass even without the recent xfs_db
> xfsprogs change.

Really?  Not here, xfsprogs-4.5.0 :

# xfs_db -c "daddr 2" -c "type agi" fsfile
Metadata CRC error detected at xfs_agi block 0x2/0x200


-Eric

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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 19:01       ` Eric Sandeen
@ 2017-07-14 19:11         ` Bill O'Donnell
  2017-07-14 19:58           ` Bill O'Donnell
  0 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-14 19:11 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

On Fri, Jul 14, 2017 at 02:01:31PM -0500, Eric Sandeen wrote:
> 
> 
> On 07/14/2017 11:47 AM, Bill O'Donnell wrote:
> > On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:
> 
> 
> >>> +# for different sector sizes, ensure no CRC errors are falsely reported
> >>> +
> >>> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> >>> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> >>> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> >>
> >> This leaves me wondering why we don't test most of the above ;)
> >>
> >>> +# For various sector sizes, test some types that involve type size.
> >>> +for SECTOR_SIZE in 512 1024 2048 4096; do
> >>> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> >>> +    for TYPE in agf agi agfl sb; do
> >>> +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> >>> +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
> >>
> >> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
> > It's drawn from the reproducer test case.
> > The first "-c $TYPE" sets the object, "daddr 42" is an arbitrary address set. Without
> > the daddr change and change-back, the test will pass even without the recent xfs_db
> > xfsprogs change.
> 
> Really?  Not here, xfsprogs-4.5.0 :
> 
> # xfs_db -c "daddr 2" -c "type agi" fsfile
> Metadata CRC error detected at xfs_agi block 0x2/0x200

Ahh, ok, you're correct - I'll modify the test accordingly.
Thanks-
Bill


> 
> 
> -Eric

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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 19:11         ` Bill O'Donnell
@ 2017-07-14 19:58           ` Bill O'Donnell
  2017-07-14 21:43             ` Eric Sandeen
  0 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-14 19:58 UTC (permalink / raw)
  To: Eric Sandeen, fstests

On Fri, Jul 14, 2017 at 02:11:01PM -0500, Bill O'Donnell wrote:
> On Fri, Jul 14, 2017 at 02:01:31PM -0500, Eric Sandeen wrote:
> > 
> > 
> > On 07/14/2017 11:47 AM, Bill O'Donnell wrote:
> > > On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:
> > 
> > 
> > >>> +# for different sector sizes, ensure no CRC errors are falsely reported
> > >>> +
> > >>> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> > >>> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> > >>> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> > >>
> > >> This leaves me wondering why we don't test most of the above ;)
> > >>
> > >>> +# For various sector sizes, test some types that involve type size.
> > >>> +for SECTOR_SIZE in 512 1024 2048 4096; do
> > >>> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> > >>> +    for TYPE in agf agi agfl sb; do
> > >>> +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
> > >>> +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
> > >>
> > >> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
> > > It's drawn from the reproducer test case.
> > > The first "-c $TYPE" sets the object, "daddr 42" is an arbitrary address set. Without
> > > the daddr change and change-back, the test will pass even without the recent xfs_db
> > > xfsprogs change.
> > 
> > Really?  Not here, xfsprogs-4.5.0 :
> > 
> > # xfs_db -c "daddr 2" -c "type agi" fsfile
> > Metadata CRC error detected at xfs_agi block 0x2/0x200
> 
> Ahh, ok, you're correct - I'll modify the test accordingly.

Wait. I still think the object has to get set with "-c $TYPE". If not
the crc error occurs even with the new xfs_db code:
# xfs_db -V
xfs_db version 4.12.0-rc2
# xfs_db /dev/sda6
xfs_db> daddr
current daddr is 0
xfs_db> daddr 2
xfs_db> type agi
Metadata CRC error detected at xfs_agi block 0x2/0x1000
Metadata CRC error detected at xfs_agi block 0x2/0x1000

And error is gone when the object is set and the daddr gets
set to the correct value.
[root@localhost xfsprogs-dev3]# xfs_db /dev/sda6
xfs_db> agi
xfs_db> daddr
current daddr is 16
xfs_db> daddr 2
xfs_db> daddr 16
xfs_db> type agi


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

* Re: [PATCH] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-14 19:58           ` Bill O'Donnell
@ 2017-07-14 21:43             ` Eric Sandeen
  0 siblings, 0 replies; 20+ messages in thread
From: Eric Sandeen @ 2017-07-14 21:43 UTC (permalink / raw)
  To: Bill O'Donnell, fstests



On 07/14/2017 02:58 PM, Bill O'Donnell wrote:
> On Fri, Jul 14, 2017 at 02:11:01PM -0500, Bill O'Donnell wrote:
>> On Fri, Jul 14, 2017 at 02:01:31PM -0500, Eric Sandeen wrote:
>>>
>>>
>>> On 07/14/2017 11:47 AM, Bill O'Donnell wrote:
>>>> On Fri, Jul 14, 2017 at 10:42:57AM -0500, Eric Sandeen wrote:
>>>
>>>
>>>>>> +# for different sector sizes, ensure no CRC errors are falsely reported
>>>>>> +
>>>>>> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
>>>>>> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
>>>>>> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
>>>>>
>>>>> This leaves me wondering why we don't test most of the above ;)
>>>>>
>>>>>> +# For various sector sizes, test some types that involve type size.
>>>>>> +for SECTOR_SIZE in 512 1024 2048 4096; do
>>>>>> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
>>>>>> +    for TYPE in agf agi agfl sb; do
>>>>>> +	DADDR=`$XFS_DB_PROG -c "$TYPE" -c "daddr" $SCRATCH_DEV | _filter_dbval`
>>>>>> +	$XFS_DB_PROG -c "$TYPE" -c "daddr 42" -c "daddr $DADDR" -c "type $TYPE" $SCRATCH_DEV
>>>>>
>>>>> Hm is there a reason for the first "-c $TYPE" or even the "daddr 42" in the line just above?
>>>> It's drawn from the reproducer test case.
>>>> The first "-c $TYPE" sets the object, "daddr 42" is an arbitrary address set. Without
>>>> the daddr change and change-back, the test will pass even without the recent xfs_db
>>>> xfsprogs change.
>>>
>>> Really?  Not here, xfsprogs-4.5.0 :
>>>
>>> # xfs_db -c "daddr 2" -c "type agi" fsfile
>>> Metadata CRC error detected at xfs_agi block 0x2/0x200
>>
>> Ahh, ok, you're correct - I'll modify the test accordingly.
> 
> Wait. I still think the object has to get set with "-c $TYPE". If not
> the crc error occurs even with the new xfs_db code:
> # xfs_db -V
> xfs_db version 4.12.0-rc2
> # xfs_db /dev/sda6
> xfs_db> daddr
> current daddr is 0
> xfs_db> daddr 2
> xfs_db> type agi
> Metadata CRC error detected at xfs_agi block 0x2/0x1000
> Metadata CRC error detected at xfs_agi block 0x2/0x1000

You've set daddr to 2... presumably on a 4k sector fs ...

> 
> And error is gone when the object is set and the daddr gets
> set to the correct value.
> [root@localhost xfsprogs-dev3]# xfs_db /dev/sda6
> xfs_db> agi
> xfs_db> daddr
> current daddr is 16

... but the agi is at daddr 16, not 2.

IOWS, you've told it the wrong type for daddr 2 (which is halfway through
the first superblock; daddr 2 is not the beginning of any on-disk structure)
so if you ask it to tell you about that block as an
AGI, it'll tell you that it's corrupted, because it's /not/ an agi.

> xfs_db> daddr 2
> xfs_db> daddr 16

If you correctly tell it to show you block 16 as an AGI...

> xfs_db> type agi

... it works.

-Eric

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

* [PATCH v3] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
  2017-07-12 19:02 ` Eric Sandeen
  2017-07-14 14:27 ` [PATCH] xfs/424: test xfs_db to ensure type " Bill O'Donnell
@ 2017-07-17 18:53 ` Bill O'Donnell
  2017-07-17 19:41   ` Eric Sandeen
  2017-07-17 22:09 ` [PATCH v4] " Bill O'Donnell
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-17 18:53 UTC (permalink / raw)
  To: fstests

xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
v2: Clarify commit message and test comments. Add a few more test cases.
v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
    accomodate fses with external logs. Remove superfluous daddr and type
    commands.

 tests/xfs/424     | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |  1 +
 tests/xfs/group   |  1 +
 3 files changed, 95 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..8415ecd1
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,93 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take type size into account when setting type.
+# If type size isn't updated whenever type is set, a false crc
+# error can occur due to the stale size. This test checks for
+# that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+_filter_dbval()
+{
+    awk '{ print $4 }'
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# Modify as appropriate
+_supported_os Linux
+_supported_fs xfs
+_require_scratch
+
+# real QA test starts here
+_scratch_unmount >> $seqres.full 2>&1
+
+# for different sector sizes, ensure no CRC errors are falsely reported.
+
+# Supported types include: agf, agfl, agi, attr3, bmapbta,
+# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
+# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
+# For various sector sizes, test some types that involve type size.
+for SECTOR_SIZE in 512 1024 2048 4096; do
+    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
+
+    for TYPE in agf agi agfl sb; do
+	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
+    done
+
+    for TYPE in inodata data log text rtbitmap rtsummary; do
+	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
+    done
+
+    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
+    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
+    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
+    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..d879a949
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1 @@
+QA output created by 424
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.3


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

* Re: [PATCH v3] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-17 18:53 ` [PATCH v3] " Bill O'Donnell
@ 2017-07-17 19:41   ` Eric Sandeen
  2017-07-17 19:48     ` Bill O'Donnell
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Sandeen @ 2017-07-17 19:41 UTC (permalink / raw)
  To: Bill O'Donnell, fstests



On 07/17/2017 01:53 PM, Bill O'Donnell wrote:
> xfs_db should take type size into account when setting type.
> If type size isn't updated whenever type is set, a false crc
> error can occur due to the stale size. This test checks for
> that false crc error.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> ---
> v2: Clarify commit message and test comments. Add a few more test cases.
> v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
>     accomodate fses with external logs. Remove superfluous daddr and type
>     commands.
> 
>  tests/xfs/424     | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/424.out |  1 +
>  tests/xfs/group   |  1 +
>  3 files changed, 95 insertions(+)
>  create mode 100755 tests/xfs/424
>  create mode 100644 tests/xfs/424.out
> 
> diff --git a/tests/xfs/424 b/tests/xfs/424
> new file mode 100755
> index 00000000..8415ecd1
> --- /dev/null
> +++ b/tests/xfs/424
> @@ -0,0 +1,93 @@
> +#! /bin/bash
> +# FS QA Test 424
> +#
> +# xfs_db should take type size into account when setting type.
> +# If type size isn't updated whenever type is set, a false crc
> +# error can occur due to the stale size. This test checks for
> +# that false crc error.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $tmp.*
> +}
> +
> +_filter_dbval()
> +{
> +    awk '{ print $4 }'
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# Modify as appropriate
> +_supported_os Linux
> +_supported_fs xfs
> +_require_scratch
> +
> +# real QA test starts here
> +_scratch_unmount >> $seqres.full 2>&1
> +
> +# for different sector sizes, ensure no CRC errors are falsely reported.
> +
> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> +# For various sector sizes, test some types that involve type size.
> +for SECTOR_SIZE in 512 1024 2048 4096; do
> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> +
> +    for TYPE in agf agi agfl sb; do
> +	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> +    done
> +
> +    for TYPE in inodata data log text rtbitmap rtsummary; do
> +	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> +    done

Ok, I don't understand this part.  For each of those types, you get the address of
the root inode, then set it to the type - including types which are... not inodes?

(sure, type text & type data can be anything, but the others are specific data
types...)

> +
> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"

to test the generic data & text types, you could just do:

+    _scratch_xfs_db -c "daddr $DADDR" -c "type text"
+    _scratch_xfs_db -c "daddr $DADDR" -c "type data"

here.  They don't hae CRCs anyway so if the test is truly to "test for crc errors"
then maybe it's not needed, but it can't hurt to actually iterate through each type
that's possible. 

> +done
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> new file mode 100644
> index 00000000..d879a949
> --- /dev/null
> +++ b/tests/xfs/424.out
> @@ -0,0 +1 @@
> +QA output created by 424
> diff --git a/tests/xfs/group b/tests/xfs/group
> index ffdb0615..75c8280c 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -421,3 +421,4 @@
>  421 auto quick clone dedupe
>  422 dangerous_scrub dangerous_online_repair
>  423 dangerous_scrub
> +424 auto quick db
> 

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

* Re: [PATCH v3] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-17 19:41   ` Eric Sandeen
@ 2017-07-17 19:48     ` Bill O'Donnell
  2017-07-17 20:23       ` Eric Sandeen
  0 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-17 19:48 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

On Mon, Jul 17, 2017 at 02:41:04PM -0500, Eric Sandeen wrote:
> 
> 
> On 07/17/2017 01:53 PM, Bill O'Donnell wrote:
> > xfs_db should take type size into account when setting type.
> > If type size isn't updated whenever type is set, a false crc
> > error can occur due to the stale size. This test checks for
> > that false crc error.
> > 
> > Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> > ---
> > v2: Clarify commit message and test comments. Add a few more test cases.
> > v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
> >     accomodate fses with external logs. Remove superfluous daddr and type
> >     commands.
> > 
> >  tests/xfs/424     | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/424.out |  1 +
> >  tests/xfs/group   |  1 +
> >  3 files changed, 95 insertions(+)
> >  create mode 100755 tests/xfs/424
> >  create mode 100644 tests/xfs/424.out
> > 
> > diff --git a/tests/xfs/424 b/tests/xfs/424
> > new file mode 100755
> > index 00000000..8415ecd1
> > --- /dev/null
> > +++ b/tests/xfs/424
> > @@ -0,0 +1,93 @@
> > +#! /bin/bash
> > +# FS QA Test 424
> > +#
> > +# xfs_db should take type size into account when setting type.
> > +# If type size isn't updated whenever type is set, a false crc
> > +# error can occur due to the stale size. This test checks for
> > +# that false crc error.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1	# failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > +	cd /
> > +	rm -f $tmp.*
> > +}
> > +
> > +_filter_dbval()
> > +{
> > +    awk '{ print $4 }'
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# Modify as appropriate
> > +_supported_os Linux
> > +_supported_fs xfs
> > +_require_scratch
> > +
> > +# real QA test starts here
> > +_scratch_unmount >> $seqres.full 2>&1
> > +
> > +# for different sector sizes, ensure no CRC errors are falsely reported.
> > +
> > +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> > +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> > +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> > +# For various sector sizes, test some types that involve type size.
> > +for SECTOR_SIZE in 512 1024 2048 4096; do
> > +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> > +
> > +    for TYPE in agf agi agfl sb; do
> > +	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> > +    done
> > +
> > +    for TYPE in inodata data log text rtbitmap rtsummary; do
> > +	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> > +    done
> 
> Ok, I don't understand this part.  For each of those types, you get the address of
> the root inode, then set it to the type - including types which are... not inodes?

For this case, where addr set to rootino, the types included indeed work fine, but
"type inode" yields crc error(s). :/
It might make more sense to just leave the inodata data log text rtbitmap rtsummary
types out of the test. 

fs_db> sb
xfs_db> addr rootino
xfs_db> daddr
current daddr is 96
xfs_db> type inode
Metadata corruption detected at xfs_inode block 0x60/0x200
Metadata corruption detected at xfs_inode block 0x60/0x200
. . .


> 
> (sure, type text & type data can be anything, but the others are specific data
> types...)
> 
> > +
> > +    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
> > +    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
> > +    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
> > +    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
> > +    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
> > +    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
> > +    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
> > +    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
> 
> to test the generic data & text types, you could just do:
> 
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type text"
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type data"
> 
> here.  They don't hae CRCs anyway so if the test is truly to "test for crc errors"
> then maybe it's not needed, but it can't hurt to actually iterate through each type
> that's possible. 
> 
> > +done
> > +
> > +# success, all done
> > +status=0
> > +exit
> > diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> > new file mode 100644
> > index 00000000..d879a949
> > --- /dev/null
> > +++ b/tests/xfs/424.out
> > @@ -0,0 +1 @@
> > +QA output created by 424
> > diff --git a/tests/xfs/group b/tests/xfs/group
> > index ffdb0615..75c8280c 100644
> > --- a/tests/xfs/group
> > +++ b/tests/xfs/group
> > @@ -421,3 +421,4 @@
> >  421 auto quick clone dedupe
> >  422 dangerous_scrub dangerous_online_repair
> >  423 dangerous_scrub
> > +424 auto quick db
> > 

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

* Re: [PATCH v3] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-17 19:48     ` Bill O'Donnell
@ 2017-07-17 20:23       ` Eric Sandeen
  0 siblings, 0 replies; 20+ messages in thread
From: Eric Sandeen @ 2017-07-17 20:23 UTC (permalink / raw)
  To: Bill O'Donnell; +Cc: fstests

On 07/17/2017 02:48 PM, Bill O'Donnell wrote:
> On Mon, Jul 17, 2017 at 02:41:04PM -0500, Eric Sandeen wrote:
>>
>>
>> On 07/17/2017 01:53 PM, Bill O'Donnell wrote:
>>> xfs_db should take type size into account when setting type.
>>> If type size isn't updated whenever type is set, a false crc
>>> error can occur due to the stale size. This test checks for
>>> that false crc error.
>>>
>>> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
>>> ---
>>> v2: Clarify commit message and test comments. Add a few more test cases.
>>> v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
>>>     accomodate fses with external logs. Remove superfluous daddr and type
>>>     commands.
>>>
>>>  tests/xfs/424     | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  tests/xfs/424.out |  1 +
>>>  tests/xfs/group   |  1 +
>>>  3 files changed, 95 insertions(+)
>>>  create mode 100755 tests/xfs/424
>>>  create mode 100644 tests/xfs/424.out
>>>
>>> diff --git a/tests/xfs/424 b/tests/xfs/424
>>> new file mode 100755
>>> index 00000000..8415ecd1
>>> --- /dev/null
>>> +++ b/tests/xfs/424
>>> @@ -0,0 +1,93 @@
>>> +#! /bin/bash
>>> +# FS QA Test 424
>>> +#
>>> +# xfs_db should take type size into account when setting type.
>>> +# If type size isn't updated whenever type is set, a false crc
>>> +# error can occur due to the stale size. This test checks for
>>> +# that false crc error.
>>> +#
>>> +#-----------------------------------------------------------------------
>>> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
>>> +#
>>> +# This program is free software; you can redistribute it and/or
>>> +# modify it under the terms of the GNU General Public License as
>>> +# published by the Free Software Foundation.
>>> +#
>>> +# This program is distributed in the hope that it would be useful,
>>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> +# GNU General Public License for more details.
>>> +#
>>> +# You should have received a copy of the GNU General Public License
>>> +# along with this program; if not, write the Free Software Foundation,
>>> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>>> +#-----------------------------------------------------------------------
>>> +#
>>> +
>>> +seq=`basename $0`
>>> +seqres=$RESULT_DIR/$seq
>>> +echo "QA output created by $seq"
>>> +
>>> +here=`pwd`
>>> +tmp=/tmp/$$
>>> +status=1	# failure is the default!
>>> +trap "_cleanup; exit \$status" 0 1 2 3 15
>>> +
>>> +_cleanup()
>>> +{
>>> +	cd /
>>> +	rm -f $tmp.*
>>> +}
>>> +
>>> +_filter_dbval()
>>> +{
>>> +    awk '{ print $4 }'
>>> +}
>>> +
>>> +# get standard environment, filters and checks
>>> +. ./common/rc
>>> +. ./common/filter
>>> +
>>> +# remove previous $seqres.full before test
>>> +rm -f $seqres.full
>>> +
>>> +# Modify as appropriate
>>> +_supported_os Linux
>>> +_supported_fs xfs
>>> +_require_scratch
>>> +
>>> +# real QA test starts here
>>> +_scratch_unmount >> $seqres.full 2>&1
>>> +
>>> +# for different sector sizes, ensure no CRC errors are falsely reported.
>>> +
>>> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
>>> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
>>> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
>>> +# For various sector sizes, test some types that involve type size.
>>> +for SECTOR_SIZE in 512 1024 2048 4096; do
>>> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
>>> +
>>> +    for TYPE in agf agi agfl sb; do
>>> +	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
>>> +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
>>> +    done
>>> +
>>> +    for TYPE in inodata data log text rtbitmap rtsummary; do
>>> +	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
>>> +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
>>> +    done
>>
>> Ok, I don't understand this part.  For each of those types, you get the address of
>> the root inode, then set it to the type - including types which are... not inodes?
> 
> For this case, where addr set to rootino, the types included indeed work fine, but
> "type inode" yields crc error(s). :/

My [PATCH] xfs_db: properly set inode type should fix that... but I got hung up on what
to do if the current disk address isn't even an inode-aligned sector.
I ... think we should let it proceed, it's a debug tool after all.
Sorry, I forgot this wasn't in.


> It might make more sense to just leave the inodata data log text rtbitmap rtsummary
> types out of the test. 

Or just set them up properly:

+    DADDR=`_scratch_xfs_db -c "sb" -c "addr rbmino" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type rtbitmap"

+    DADDR=`_scratch_xfs_db -c "sb" -c "addr rsumino" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type rtsummary"

+    DADDR=`_scratch_xfs_db -c "sb" -c "addr logstart" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type log"


but i'm a little confused by some of these types.  if you go to the sb and then
to logstart, xfs_db does indeed set the 'log' type.  but if you go to rbmino,
it does /not/ set rtbitmap.  Given that I don't know what these types are for,
I guess it might be best to leave them out of the test for now.

testing inode would be good though - i'll try to get that patch to a point where
I can merge it for 4.12, yet.

(and types data & text are trivial enough to do - not much to go wrong there,
but may as well exercise them while we're at it)

Might be worth it to add a comment about which ones don't get tested at this point.

-Eric

> 
> fs_db> sb
> xfs_db> addr rootino
> xfs_db> daddr
> current daddr is 96
> xfs_db> type inode
> Metadata corruption detected at xfs_inode block 0x60/0x200
> Metadata corruption detected at xfs_inode block 0x60/0x200


> 
> 
>>
>> (sure, type text & type data can be anything, but the others are specific data
>> types...)
>>
>>> +
>>> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
>>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
>>> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
>>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
>>> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
>>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
>>> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
>>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
>>
>> to test the generic data & text types, you could just do:
>>
>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type text"
>> +    _scratch_xfs_db -c "daddr $DADDR" -c "type data"
>>
>> here.  They don't hae CRCs anyway so if the test is truly to "test for crc errors"
>> then maybe it's not needed, but it can't hurt to actually iterate through each type
>> that's possible. 
>>
>>> +done
>>> +
>>> +# success, all done
>>> +status=0
>>> +exit
>>> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
>>> new file mode 100644
>>> index 00000000..d879a949
>>> --- /dev/null
>>> +++ b/tests/xfs/424.out
>>> @@ -0,0 +1 @@
>>> +QA output created by 424
>>> diff --git a/tests/xfs/group b/tests/xfs/group
>>> index ffdb0615..75c8280c 100644
>>> --- a/tests/xfs/group
>>> +++ b/tests/xfs/group
>>> @@ -421,3 +421,4 @@
>>>  421 auto quick clone dedupe
>>>  422 dangerous_scrub dangerous_online_repair
>>>  423 dangerous_scrub
>>> +424 auto quick db
>>>
> 

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

* [PATCH v4] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
                   ` (2 preceding siblings ...)
  2017-07-17 18:53 ` [PATCH v3] " Bill O'Donnell
@ 2017-07-17 22:09 ` Bill O'Donnell
  2017-07-20  4:08   ` Eryu Guan
  2017-07-21 14:53 ` [PATCH v5] " Bill O'Donnell
  2017-07-24 15:07 ` [PATCH v6] " Bill O'Donnell
  5 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-17 22:09 UTC (permalink / raw)
  To: fstests

xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
v2: Clarify commit message and test comments. Add a few more test cases.
v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
    accomodate fses with external logs. Remove superfluous daddr and type
    commands.
v4: Skip select tests and make a corresponding note in the comments. Add
    test for type inode (note: depends on pending xfsprogs patch
    xfs_db: properly set inode type).

 tests/xfs/424     | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |  1 +
 tests/xfs/group   |  1 +
 3 files changed, 99 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..cfce18e1
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,97 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take type size into account when setting type.
+# If type size isn't updated whenever type is set, a false crc
+# error can occur due to the stale size. This test checks for
+# that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+_filter_dbval()
+{
+    awk '{ print $4 }'
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# Modify as appropriate
+_supported_os Linux
+_supported_fs xfs
+_require_scratch
+
+# real QA test starts here
+_scratch_unmount >> $seqres.full 2>&1
+
+# for different sector sizes, ensure no CRC errors are falsely reported.
+
+# Supported types include: agf, agfl, agi, attr3, bmapbta,
+# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
+# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
+# For various sector sizes, test some types that involve type size.
+#
+# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
+# rtbitmap, rtsummary, log
+#
+for SECTOR_SIZE in 512 1024 2048 4096; do
+    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
+
+    for TYPE in agf agi agfl sb; do
+	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
+    done
+
+    DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type inode"
+    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
+    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
+    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
+    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
+    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
+
+    _scratch_xfs_db -c "daddr $DADDR" -c "type text"
+    _scratch_xfs_db -c "daddr $DADDR" -c "type data"
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..d879a949
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1 @@
+QA output created by 424
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.3


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

* Re: [PATCH v4] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-17 22:09 ` [PATCH v4] " Bill O'Donnell
@ 2017-07-20  4:08   ` Eryu Guan
  0 siblings, 0 replies; 20+ messages in thread
From: Eryu Guan @ 2017-07-20  4:08 UTC (permalink / raw)
  To: Bill O'Donnell; +Cc: fstests, Eric Sandeen, Darrick J. Wong

On Mon, Jul 17, 2017 at 05:09:49PM -0500, Bill O'Donnell wrote:
> xfs_db should take type size into account when setting type.
> If type size isn't updated whenever type is set, a false crc
> error can occur due to the stale size. This test checks for
> that false crc error.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> ---
> v2: Clarify commit message and test comments. Add a few more test cases.
> v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
>     accomodate fses with external logs. Remove superfluous daddr and type
>     commands.
> v4: Skip select tests and make a corresponding note in the comments. Add
>     test for type inode (note: depends on pending xfsprogs patch
>     xfs_db: properly set inode type).

Eric, Darrick, do you have any more comments on this test? Thanks a lot
for your reviews on previous versions!

I have some nitpicks from the fstests point of view, though :)

> 
>  tests/xfs/424     | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/424.out |  1 +
>  tests/xfs/group   |  1 +
>  3 files changed, 99 insertions(+)
>  create mode 100755 tests/xfs/424
>  create mode 100644 tests/xfs/424.out
> 
> diff --git a/tests/xfs/424 b/tests/xfs/424
> new file mode 100755
> index 00000000..cfce18e1
> --- /dev/null
> +++ b/tests/xfs/424
> @@ -0,0 +1,97 @@
> +#! /bin/bash
> +# FS QA Test 424
> +#
> +# xfs_db should take type size into account when setting type.
> +# If type size isn't updated whenever type is set, a false crc
> +# error can occur due to the stale size. This test checks for
> +# that false crc error.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $tmp.*
> +}
> +
> +_filter_dbval()

I'd name it without the leading underscore, as it's a local function.

> +{
> +    awk '{ print $4 }'
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# Modify as appropriate
> +_supported_os Linux
> +_supported_fs xfs
> +_require_scratch
> +
> +# real QA test starts here
> +_scratch_unmount >> $seqres.full 2>&1

This is not needed, _require_scratch will umount and _fail if umount
failed.

> +
> +# for different sector sizes, ensure no CRC errors are falsely reported.
> +
> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> +# For various sector sizes, test some types that involve type size.
> +#
> +# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
> +# rtbitmap, rtsummary, log
> +#
> +for SECTOR_SIZE in 512 1024 2048 4096; do
> +    $MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> +
> +    for TYPE in agf agi agfl sb; do
> +	DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | _filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> +    done
> +
> +    DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type inode"
> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
> +    DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
> +    DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" | _filter_dbval`
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
> +
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type text"
> +    _scratch_xfs_db -c "daddr $DADDR" -c "type data"

Please use tab for indention.

> +done

And need to echo "Silence is golden" somewhere in the test to indicate
we don't expect any output from the test.

Thanks,
Eryu

> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> new file mode 100644
> index 00000000..d879a949
> --- /dev/null
> +++ b/tests/xfs/424.out
> @@ -0,0 +1 @@
> +QA output created by 424
> diff --git a/tests/xfs/group b/tests/xfs/group
> index ffdb0615..75c8280c 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -421,3 +421,4 @@
>  421 auto quick clone dedupe
>  422 dangerous_scrub dangerous_online_repair
>  423 dangerous_scrub
> +424 auto quick db
> -- 
> 2.13.3
> 
> --
> 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] 20+ messages in thread

* [PATCH v5] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
                   ` (3 preceding siblings ...)
  2017-07-17 22:09 ` [PATCH v4] " Bill O'Donnell
@ 2017-07-21 14:53 ` Bill O'Donnell
  2017-07-24 11:54   ` Eryu Guan
  2017-07-24 15:07 ` [PATCH v6] " Bill O'Donnell
  5 siblings, 1 reply; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-21 14:53 UTC (permalink / raw)
  To: fstests

xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
v2: Clarify commit message and test comments. Add a few more test cases.
v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
    accomodate fses with external logs. Remove superfluous daddr and type
    commands.
v4: Skip select tests and make a corresponding note in the comments. Add
    test for type inode (note: depends on pending xfsprogs patch
    xfs_db: properly set inode type).
v5: Cleanup tabs/spaces and whitespace. Rename local function filter_dbval().
    Remove unneeded _scratch_unmount. Add "Silence is golden" output.

 tests/xfs/424     | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |   2 ++
 tests/xfs/group   |   1 +
 3 files changed, 106 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..d5603d03
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,103 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take type size into account when setting type.
+# If type size isn't updated whenever type is set, a false crc
+# error can occur due to the stale size. This test checks for
+# that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+filter_dbval()
+{
+	awk '{ print $4 }'
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# Modify as appropriate
+_supported_os Linux
+_supported_fs xfs
+_require_scratch
+
+echo "Silence is golden."
+
+# real QA test starts here
+
+# for different sector sizes, ensure no CRC errors are falsely reported.
+
+# Supported types include: agf, agfl, agi, attr3, bmapbta,
+# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
+# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
+# For various sector sizes, test some types that involve type size.
+#
+# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
+# rtbitmap, rtsummary, log
+#
+for SECTOR_SIZE in 512 1024 2048 4096; do
+$MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
+
+	for TYPE in agf agi agfl sb; do
+		DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | filter_dbval`
+		_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
+	done
+
+	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type inode"
+	DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
+	DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
+	DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
+	DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
+
+	_scratch_xfs_db -c "daddr $DADDR" -c "type text"
+	_scratch_xfs_db -c "daddr $DADDR" -c "type data"
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..ca196cd9
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1,2 @@
+QA output created by 424
+Silence is golden.
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.3


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

* Re: [PATCH v5] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-21 14:53 ` [PATCH v5] " Bill O'Donnell
@ 2017-07-24 11:54   ` Eryu Guan
  2017-07-24 15:00     ` Bill O'Donnell
  0 siblings, 1 reply; 20+ messages in thread
From: Eryu Guan @ 2017-07-24 11:54 UTC (permalink / raw)
  To: Bill O'Donnell; +Cc: fstests

On Fri, Jul 21, 2017 at 09:53:19AM -0500, Bill O'Donnell wrote:
> xfs_db should take type size into account when setting type.
> If type size isn't updated whenever type is set, a false crc
> error can occur due to the stale size. This test checks for
> that false crc error.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> ---
> v2: Clarify commit message and test comments. Add a few more test cases.
> v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
>     accomodate fses with external logs. Remove superfluous daddr and type
>     commands.
> v4: Skip select tests and make a corresponding note in the comments. Add
>     test for type inode (note: depends on pending xfsprogs patch
>     xfs_db: properly set inode type).
> v5: Cleanup tabs/spaces and whitespace. Rename local function filter_dbval().
>     Remove unneeded _scratch_unmount. Add "Silence is golden" output.
> 
>  tests/xfs/424     | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/424.out |   2 ++
>  tests/xfs/group   |   1 +
>  3 files changed, 106 insertions(+)
>  create mode 100755 tests/xfs/424
>  create mode 100644 tests/xfs/424.out
> 
> diff --git a/tests/xfs/424 b/tests/xfs/424
> new file mode 100755
> index 00000000..d5603d03
> --- /dev/null
> +++ b/tests/xfs/424
> @@ -0,0 +1,103 @@
> +#! /bin/bash
> +# FS QA Test 424
> +#
> +# xfs_db should take type size into account when setting type.
> +# If type size isn't updated whenever type is set, a false crc
> +# error can occur due to the stale size. This test checks for
> +# that false crc error.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $tmp.*
> +}
> +
> +filter_dbval()
> +{
> +	awk '{ print $4 }'
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# Modify as appropriate
> +_supported_os Linux
> +_supported_fs xfs
> +_require_scratch
> +
> +echo "Silence is golden."
> +
> +# real QA test starts here
> +
> +# for different sector sizes, ensure no CRC errors are falsely reported.
> +
> +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> +# For various sector sizes, test some types that involve type size.
> +#
> +# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
> +# rtbitmap, rtsummary, log
> +#
> +for SECTOR_SIZE in 512 1024 2048 4096; do

Sorry, I just found this today, this may not work with 4k sector disks.
Seems we need to work out the supported sector sizes from
`_min_dio_alignment $SCRATCH_DEV`, e.g.

sec_sz=`_min_dio_alignment $SCRATCH_DEV`
while [ $sec_sz -le 4096 ]; do
	sector_sizes="$sector_sizes $sec_sz"
	sec_sz=$((sec_sz * 2))
done

for SECTOR_SIZE in $sector_sizes; do
...

> +$MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null

And the indention of this MKFS_XFS_PROG seems wrong :)

Thanks,
Eryu

> +
> +	for TYPE in agf agi agfl sb; do
> +		DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | filter_dbval`
> +		_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> +	done
> +
> +	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" |
> +		filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type inode"
> +	DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" |
> +		filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
> +	DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" |
> +		filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
> +	DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" |
> +		filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
> +	DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" |
> +		filter_dbval`
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
> +
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type text"
> +	_scratch_xfs_db -c "daddr $DADDR" -c "type data"
> +done
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> new file mode 100644
> index 00000000..ca196cd9
> --- /dev/null
> +++ b/tests/xfs/424.out
> @@ -0,0 +1,2 @@
> +QA output created by 424
> +Silence is golden.
> diff --git a/tests/xfs/group b/tests/xfs/group
> index ffdb0615..75c8280c 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -421,3 +421,4 @@
>  421 auto quick clone dedupe
>  422 dangerous_scrub dangerous_online_repair
>  423 dangerous_scrub
> +424 auto quick db
> -- 
> 2.13.3
> 
> --
> 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] 20+ messages in thread

* Re: [PATCH v5] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-24 11:54   ` Eryu Guan
@ 2017-07-24 15:00     ` Bill O'Donnell
  0 siblings, 0 replies; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-24 15:00 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Mon, Jul 24, 2017 at 07:54:41PM +0800, Eryu Guan wrote:
> On Fri, Jul 21, 2017 at 09:53:19AM -0500, Bill O'Donnell wrote:
> > xfs_db should take type size into account when setting type.
> > If type size isn't updated whenever type is set, a false crc
> > error can occur due to the stale size. This test checks for
> > that false crc error.
> > 
> > Signed-off-by: Bill O'Donnell <billodo@redhat.com>
> > ---
> > v2: Clarify commit message and test comments. Add a few more test cases.
> > v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
> >     accomodate fses with external logs. Remove superfluous daddr and type
> >     commands.
> > v4: Skip select tests and make a corresponding note in the comments. Add
> >     test for type inode (note: depends on pending xfsprogs patch
> >     xfs_db: properly set inode type).
> > v5: Cleanup tabs/spaces and whitespace. Rename local function filter_dbval().
> >     Remove unneeded _scratch_unmount. Add "Silence is golden" output.
> > 
> >  tests/xfs/424     | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/424.out |   2 ++
> >  tests/xfs/group   |   1 +
> >  3 files changed, 106 insertions(+)
> >  create mode 100755 tests/xfs/424
> >  create mode 100644 tests/xfs/424.out
> > 
> > diff --git a/tests/xfs/424 b/tests/xfs/424
> > new file mode 100755
> > index 00000000..d5603d03
> > --- /dev/null
> > +++ b/tests/xfs/424
> > @@ -0,0 +1,103 @@
> > +#! /bin/bash
> > +# FS QA Test 424
> > +#
> > +# xfs_db should take type size into account when setting type.
> > +# If type size isn't updated whenever type is set, a false crc
> > +# error can occur due to the stale size. This test checks for
> > +# that false crc error.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1	# failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > +	cd /
> > +	rm -f $tmp.*
> > +}
> > +
> > +filter_dbval()
> > +{
> > +	awk '{ print $4 }'
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# Modify as appropriate
> > +_supported_os Linux
> > +_supported_fs xfs
> > +_require_scratch
> > +
> > +echo "Silence is golden."
> > +
> > +# real QA test starts here
> > +
> > +# for different sector sizes, ensure no CRC errors are falsely reported.
> > +
> > +# Supported types include: agf, agfl, agi, attr3, bmapbta,
> > +# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
> > +# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
> > +# For various sector sizes, test some types that involve type size.
> > +#
> > +# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
> > +# rtbitmap, rtsummary, log
> > +#
> > +for SECTOR_SIZE in 512 1024 2048 4096; do
> 
> Sorry, I just found this today, this may not work with 4k sector disks.
> Seems we need to work out the supported sector sizes from
> `_min_dio_alignment $SCRATCH_DEV`, e.g.
> 
> sec_sz=`_min_dio_alignment $SCRATCH_DEV`
> while [ $sec_sz -le 4096 ]; do
> 	sector_sizes="$sector_sizes $sec_sz"
> 	sec_sz=$((sec_sz * 2))
> done
> 
> for SECTOR_SIZE in $sector_sizes; do
> ...
> 
> > +$MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
> 
> And the indention of this MKFS_XFS_PROG seems wrong :)

Ahh! Good catch, and thank you. I'll submit a v6.

-Bill



> 
> Thanks,
> Eryu
> 
> > +
> > +	for TYPE in agf agi agfl sb; do
> > +		DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | filter_dbval`
> > +		_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
> > +	done
> > +
> > +	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" |
> > +		filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type inode"
> > +	DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" |
> > +		filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
> > +	DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" |
> > +		filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
> > +	DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" |
> > +		filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
> > +	DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" |
> > +		filter_dbval`
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
> > +
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type text"
> > +	_scratch_xfs_db -c "daddr $DADDR" -c "type data"
> > +done
> > +
> > +# success, all done
> > +status=0
> > +exit
> > diff --git a/tests/xfs/424.out b/tests/xfs/424.out
> > new file mode 100644
> > index 00000000..ca196cd9
> > --- /dev/null
> > +++ b/tests/xfs/424.out
> > @@ -0,0 +1,2 @@
> > +QA output created by 424
> > +Silence is golden.
> > diff --git a/tests/xfs/group b/tests/xfs/group
> > index ffdb0615..75c8280c 100644
> > --- a/tests/xfs/group
> > +++ b/tests/xfs/group
> > @@ -421,3 +421,4 @@
> >  421 auto quick clone dedupe
> >  422 dangerous_scrub dangerous_online_repair
> >  423 dangerous_scrub
> > +424 auto quick db
> > -- 
> > 2.13.3
> > 
> > --
> > 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] 20+ messages in thread

* [PATCH v6] xfs/424: test xfs_db to ensure type size taken into account with new type
  2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
                   ` (4 preceding siblings ...)
  2017-07-21 14:53 ` [PATCH v5] " Bill O'Donnell
@ 2017-07-24 15:07 ` Bill O'Donnell
  5 siblings, 0 replies; 20+ messages in thread
From: Bill O'Donnell @ 2017-07-24 15:07 UTC (permalink / raw)
  To: fstests

xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
v2: Clarify commit message and test comments. Add a few more test cases.
v3: Add more test cases. Use _scratch_xfs_db instead of $XFS_DB_PROG to
    accomodate fses with external logs. Remove superfluous daddr and type
    commands.
v4: Skip select tests and make a corresponding note in the comments. Add
    test for type inode (note: depends on pending xfsprogs patch
    xfs_db: properly set inode type).
v5: Cleanup tabs/spaces and whitespace. Rename local function filter_dbval().
    Remove unneeded _scratch_unmount. Add "Silence is golden" output.
v6: use supported sector sizes from _min_dio_alignment

 tests/xfs/424     | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/424.out |   2 +
 tests/xfs/group   |   1 +
 3 files changed, 112 insertions(+)
 create mode 100755 tests/xfs/424
 create mode 100644 tests/xfs/424.out

diff --git a/tests/xfs/424 b/tests/xfs/424
new file mode 100755
index 00000000..0a1eef98
--- /dev/null
+++ b/tests/xfs/424
@@ -0,0 +1,109 @@
+#! /bin/bash
+# FS QA Test 424
+#
+# xfs_db should take type size into account when setting type.
+# If type size isn't updated whenever type is set, a false crc
+# error can occur due to the stale size. This test checks for
+# that false crc error.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2017 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+filter_dbval()
+{
+	awk '{ print $4 }'
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# Modify as appropriate
+_supported_os Linux
+_supported_fs xfs
+_require_scratch
+
+echo "Silence is golden."
+
+# real QA test starts here
+
+# for different sector sizes, ensure no CRC errors are falsely reported.
+
+# Supported types include: agf, agfl, agi, attr3, bmapbta,
+# bmapbtd, bnobt, cntbt, data, dir3, dqblk, inobt, inodata,
+# inode, log, rtbitmap, rtsummary, sb, symlink, text, finobt.
+# For various sector sizes, test some types that involve type size.
+#
+# NOTE: skip attr3, bmapbta, bmapbtd, dir3, dqblk, inodata, symlink
+# rtbitmap, rtsummary, log
+#
+sec_sz=`_min_dio_alignment $SCRATCH_DEV`
+while [ $sec_sz -le 4096 ]; do
+	sector_sizes="$sector_sizes $sec_sz"
+	sec_sz=$((sec_sz * 2))
+done
+
+for SECTOR_SIZE in $sector_sizes; do
+	$MKFS_XFS_PROG -f -s size=$SECTOR_SIZE $SCRATCH_DEV > /dev/null
+
+	for TYPE in agf agi agfl sb; do
+		DADDR=`_scratch_xfs_db -c "$TYPE" -c "daddr" | filter_dbval`
+		_scratch_xfs_db -c "daddr $DADDR" -c "type $TYPE"
+	done
+
+	DADDR=`_scratch_xfs_db -c "sb" -c "addr rootino" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type inode"
+	DADDR=`_scratch_xfs_db -c "agf" -c "addr bnoroot" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type bnobt"
+	DADDR=`_scratch_xfs_db -c "agf" -c "addr cntroot" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type cntbt"
+	DADDR=`_scratch_xfs_db -c "agi" -c "addr root" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type inobt"
+	DADDR=`_scratch_xfs_db -c "agi" -c "addr free_root" -c "daddr" |
+		filter_dbval`
+	_scratch_xfs_db -c "daddr $DADDR" -c "type finobt"
+
+	_scratch_xfs_db -c "daddr $DADDR" -c "type text"
+	_scratch_xfs_db -c "daddr $DADDR" -c "type data"
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/424.out b/tests/xfs/424.out
new file mode 100644
index 00000000..ca196cd9
--- /dev/null
+++ b/tests/xfs/424.out
@@ -0,0 +1,2 @@
+QA output created by 424
+Silence is golden.
diff --git a/tests/xfs/group b/tests/xfs/group
index ffdb0615..75c8280c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -421,3 +421,4 @@
 421 auto quick clone dedupe
 422 dangerous_scrub dangerous_online_repair
 423 dangerous_scrub
+424 auto quick db
-- 
2.13.3


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

end of thread, other threads:[~2017-07-24 15:07 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 18:31 [PATCH] xfs/424: test xfs_db to ensure sector size taken into account with new type Bill O'Donnell
2017-07-12 19:02 ` Eric Sandeen
2017-07-14 14:27 ` [PATCH] xfs/424: test xfs_db to ensure type " Bill O'Donnell
2017-07-14 15:42   ` Eric Sandeen
2017-07-14 16:47     ` Bill O'Donnell
2017-07-14 19:01       ` Eric Sandeen
2017-07-14 19:11         ` Bill O'Donnell
2017-07-14 19:58           ` Bill O'Donnell
2017-07-14 21:43             ` Eric Sandeen
2017-07-14 17:39     ` Darrick J. Wong
2017-07-17 18:53 ` [PATCH v3] " Bill O'Donnell
2017-07-17 19:41   ` Eric Sandeen
2017-07-17 19:48     ` Bill O'Donnell
2017-07-17 20:23       ` Eric Sandeen
2017-07-17 22:09 ` [PATCH v4] " Bill O'Donnell
2017-07-20  4:08   ` Eryu Guan
2017-07-21 14:53 ` [PATCH v5] " Bill O'Donnell
2017-07-24 11:54   ` Eryu Guan
2017-07-24 15:00     ` Bill O'Donnell
2017-07-24 15:07 ` [PATCH v6] " Bill O'Donnell

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.