On 2018/9/11 下午11:58, David Sterba wrote:
> On Mon, May 14, 2018 at 02:54:41PM +0800, Qu Wenruo wrote:
>> Patches can be fetch from github:
>> https://github.com/adam900710/btrfs-progs/tree/compress_nodatasum
>>
>> It's based on v4.16 stable branch.
>>
>> James Harvey from mail list reports a strange kernel panic, whichs show
>> obviously kernel memory corruption, while after btrfs decompression
>> failure.
>>
>> It turns out that, some compressed extent get corrupted on-disk, while
>> the inode has NODATASUM set, there is no csum to prevent corrupted
>> mirror being used.
>>
>> Although the root cause should be buggy lzo implementation, it still
>> shows that btrfs is not following the behavior defined in btrfs(5):
>>
>>      Note
>>      If nodatacow or nodatasum are enabled, compression is disabled.
>>
>> So at least make btrfs check to detect such problem.
>>
>> Qu Wenruo (3):
>>   btrfs-progs: check/lowmem: Add checks for compressed extent without
>>     csum
>>   btrfs-progs: check/original: Add checks for compressed extent without
>>     csum
>>   btrfs-progs: fsck-tests: Add test case for detecting compressed extent
>>     without csum
> 
> Sorry for late reply, can you please refresh the patches on top of a
> more recent progs? Thanks.

https://github.com/adam900710/btrfs-progs/tree/compress_nodatasum

Branch updated.

Rebased to v4.17.1 tag, with first patch commit message change:
"1) 0 or less than expected csum" -> "1) missing csum"

And re-numbering the test case of the last patch from 032 to 036.

Thanks,
Qu

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to