Re: [PATCH v3 3/3] btrfs: Do super block verification before writing it to disk

2018-05-11 Thread David Sterba
On Fri, May 11, 2018 at 01:35:27PM +0800, Qu Wenruo wrote: > +/* > + * Check the validation of super block at write time. > + * Some checks like bytenr check will be skipped as their values will be > + * overwritten soon. > + * Extra checks like csum type and incompact flags will be executed here.

Re: [PATCH v3 3/3] btrfs: Do super block verification before writing it to disk

2018-05-11 Thread David Sterba
On Fri, May 11, 2018 at 01:35:27PM +0800, Qu Wenruo wrote: > There are already 2 reports about strangely corrupted super blocks, > where csum still matches but extra garbage gets slipped into super block. > > The corruption would looks like: > -- > superblock: bytenr=65536, device=/dev/sdc1 >

[PATCH v3 3/3] btrfs: Do super block verification before writing it to disk

2018-05-10 Thread Qu Wenruo
There are already 2 reports about strangely corrupted super blocks, where csum still matches but extra garbage gets slipped into super block. The corruption would looks like: -- superblock: bytenr=65536, device=/dev/sdc1 - csum_type