On Mon, May 13, 2019 at 02:55:56PM +0200, David Sterba wrote:
> > nit: case BTRFS_CSUM_TYPE_CRC32:
> > CASE BTRFS_CSUM_TYPE_SHA256:
> > return true;
>
> I'm not sure if the -Wimplicit-fallthrough accepts that without the
> annotation or not.
Looks like it does:
jthumshirn@glass:linux (btrfs-csum-rework)$ git show fs/btrfs/disk-io.c
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 342f513db712..1e0000962b8a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -389,6 +389,7 @@ static bool btrfs_supported_super_csum(struct btrfs_super_block *sb)
{
switch (btrfs_super_csum_type(sb)) {
case BTRFS_CSUM_TYPE_CRC32:
+ case BTRFS_CSUM_TYPE_SHA256:
return true;
default:
return false;
jthumshirn@glass:linux (btrfs-csum-rework)$ touch fs/btrfs/disk-io.c
jthumshirn@glass:linux (btrfs-csum-rework)$ make CC=gcc-7 -j 144 W=1 M=fs/btrfs
CC [M] fs/btrfs/disk-io.o
LD [M] fs/btrfs/btrfs.o
Building modules, stage 2.
MODPOST 1 modules
LD [M] fs/btrfs/btrfs.ko
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@xxxxxxx +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850