Re: [PATCH v3] fstests: btrfs/159 superblock corruption test case

2018-04-13 Thread Eryu Guan
On Sat, Apr 14, 2018 at 06:43:49AM +0800, Anand Jain wrote:
> 
> > > +# Test if the superblock corruption is handled correctly:
> > > +#- Test fsid miss-match (csum ok) between primary and copy 
> > > superblock
> > > +#Fixed by the ML patch:
> > > +#btrfs: check if the fsid in the primary sb and copy sb are same
> > > +#- Test if the mount fails if the primary superblock csum is
> > > +#corrupted on any disk
> > > +#- Test if the mount does not fail if the copy1 sb csum is 
> > > corrupted
> > > +#Fixed by the ML patches:
> > > +#btrfs: verify superblock checksum during scan
> > > +#btrfs: verify checksum for all devices in mount context
> > 
> > Do you have a tree that I can pull from? I want to make sure the test
> > does pass on patched kernel, but the patchset doesn't apply on v4.16
> > kernel.
> 
> We have new discussions on whether to check for the alien-superblock and
> the superblock-checksum at the mount and scan time respectively. And
> depending on its outcome this test-case should be modified as well. So
> can you please defer this fstest patch, for now, I shall send a revised
> fstest patch when kernel patches gets integrated.

Thanks for the heads-up, I'll drop it for now.

> 
> In any case, if you want to give a try, those patches are base on kdave repo
> at [1].
>  [1]
>  https://github.com/kdave/btrfs-devel.git misc-next

Thanks!

Eryu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] fstests: btrfs/159 superblock corruption test case

2018-04-13 Thread Anand Jain



+# Test if the superblock corruption is handled correctly:
+#  - Test fsid miss-match (csum ok) between primary and copy superblock
+#  Fixed by the ML patch:
+#  btrfs: check if the fsid in the primary sb and copy sb are same
+#  - Test if the mount fails if the primary superblock csum is
+#  corrupted on any disk
+#  - Test if the mount does not fail if the copy1 sb csum is corrupted
+#  Fixed by the ML patches:
+#  btrfs: verify superblock checksum during scan
+#  btrfs: verify checksum for all devices in mount context


Do you have a tree that I can pull from? I want to make sure the test
does pass on patched kernel, but the patchset doesn't apply on v4.16
kernel.


We have new discussions on whether to check for the alien-superblock and
the superblock-checksum at the mount and scan time respectively. And
depending on its outcome this test-case should be modified as well. So
can you please defer this fstest patch, for now, I shall send a revised
fstest patch when kernel patches gets integrated.

In any case, if you want to give a try, those patches are base on kdave 
repo at [1].

 [1]
 https://github.com/kdave/btrfs-devel.git misc-next

Thanks, Anand


Thanks,
Eryu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] fstests: btrfs/159 superblock corruption test case

2018-04-12 Thread Eryu Guan
On Mon, Apr 09, 2018 at 01:28:30PM +0800, Anand Jain wrote:
> Verify if the superblock corruption is handled correctly.
> 
> Signed-off-by: Anand Jain 
> ---
> v2->v3:
>  Provide the disk to be corrupted as an arg, instead of swapping the devices,
>   so drop mount_opt_minus_args().
>  159.out slightly changed.
> v1->v2:
>  $subject slightly changed
>  Added more info about the test-case
>  Keep the stuff from the ./new btrfs
>  Add mount_opt_minus_args() to get the options (if) set at the config file
>  Move DEV_GOOD & DEV_BAD to where it starts to use
>  To help debugging added run_check where possible
>  Remove {} in the out file
>  Use _filter_error_mount for mount fail cases other than -EINVAL
> 
>  tests/btrfs/159 | 149 
> 
>  tests/btrfs/159.out |  21 
>  tests/btrfs/group   |   1 +
>  3 files changed, 171 insertions(+)
>  create mode 100755 tests/btrfs/159
>  create mode 100644 tests/btrfs/159.out
> 
> diff --git a/tests/btrfs/159 b/tests/btrfs/159
> new file mode 100755
> index ..c3a50b58b0b9
> --- /dev/null
> +++ b/tests/btrfs/159
> @@ -0,0 +1,149 @@
> +#! /bin/bash
> +# FS QA Test 159
> +#
> +# Test if the superblock corruption is handled correctly:
> +#- Test fsid miss-match (csum ok) between primary and copy superblock
> +#Fixed by the ML patch:
> +#btrfs: check if the fsid in the primary sb and copy sb are same
> +#- Test if the mount fails if the primary superblock csum is
> +#corrupted on any disk
> +#- Test if the mount does not fail if the copy1 sb csum is corrupted
> +#Fixed by the ML patches:
> +#btrfs: verify superblock checksum during scan
> +#btrfs: verify checksum for all devices in mount context

Do you have a tree that I can pull from? I want to make sure the test
does pass on patched kernel, but the patchset doesn't apply on v4.16
kernel.

Thanks,
Eryu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html