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

2018-04-17 Thread Qu Wenruo
On 2018年04月17日 22:32, Anand Jain wrote: > > > On 04/17/2018 05:58 PM, Qu Wenruo wrote: >> >> >> On 2018年04月17日 17:05, Anand Jain wrote: >>> v3:     Update commit message to show the corruption in details.     Modify the kernel error message to show corruption is detected

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

2018-04-17 Thread Anand Jain
On 04/17/2018 05:58 PM, Qu Wenruo wrote: On 2018年04月17日 17:05, Anand Jain wrote: v3:    Update commit message to show the corruption in details.    Modify the kernel error message to show corruption is detected before    transaction commitment.  Nice. Thanks. more below. @@ -3310,6

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

2018-04-17 Thread Qu Wenruo
On 2018年04月17日 17:05, Anand Jain wrote: > >> v3: >>    Update commit message to show the corruption in details. >>    Modify the kernel error message to show corruption is detected before >>    transaction commitment. >  Nice. Thanks. more below. > >> @@ -3310,6 +3311,27 @@ static int

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

2018-04-17 Thread Anand Jain
v3: Update commit message to show the corruption in details. Modify the kernel error message to show corruption is detected before transaction commitment. Nice. Thanks. more below. @@ -3310,6 +3311,27 @@ static int write_dev_supers(struct btrfs_device *device,

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

2018-04-16 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

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

2018-04-16 Thread David Sterba
On Mon, Apr 16, 2018 at 09:00:38PM +0800, Qu Wenruo wrote: > > > On 2018年04月16日 20:55, Anand Jain wrote: > > > > > > On 04/16/2018 10:02 AM, Qu Wenruo wrote: > >> There are already 2 reports about strangely corrupted super blocks, > >> where csum type and incompat flags get some obvious

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

2018-04-16 Thread David Sterba
On Mon, Apr 16, 2018 at 10:02:27AM +0800, Qu Wenruo wrote: > There are already 2 reports about strangely corrupted super blocks, > where csum type and incompat flags get some obvious garbage, but csum > still matches and all other vitals are correct. > > This normally means some kernel memory

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

2018-04-16 Thread Qu Wenruo
On 2018年04月16日 20:55, Anand Jain wrote: > > > On 04/16/2018 10:02 AM, Qu Wenruo wrote: >> There are already 2 reports about strangely corrupted super blocks, >> where csum type and incompat flags get some obvious garbage, but csum >> still matches and all other vitals are correct. >> >> This

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

2018-04-16 Thread Anand Jain
On 04/16/2018 10:02 AM, Qu Wenruo wrote: There are already 2 reports about strangely corrupted super blocks, where csum type and incompat flags get some obvious garbage, but csum still matches and all other vitals are correct. This normally means some kernel memory corruption happens,

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

2018-04-15 Thread Qu Wenruo
There are already 2 reports about strangely corrupted super blocks, where csum type and incompat flags get some obvious garbage, but csum still matches and all other vitals are correct. This normally means some kernel memory corruption happens, although the cause is unknown, at least detect it