On 2019/3/11 下午11:25, Nikolay Borisov wrote: > > > On 8.03.19 г. 9:29 ч., Qu Wenruo wrote: >> We already have btrfs_check_chunk_valid() to verify each chunk before >> tree-checker. >> >> Merge that function into tree-checker, and update its error message to >> be more readable. >> >> Old error message would be something like: >> BTRFS error (device dm-3): invalid chunk num_stipres: 0 >> >> New error message would be: >> Btrfs critical (device dm-3): corrupt superblock syschunk array: chunk_start=2097152, invalid chunk num_stripes: 0 >> Or >> Btrfs critical (device dm-3): corrupt leaf: root=3 block=8388608 slot=3 chunk_start=2097152, invalid chunk num_stripes: 0 >> >> Btrfs_check_chunk_valid() is exported for super block syschunk array >> verification. >> >> Also make tree-checker to verify chunk items, this makes chunk item >> checker covers all chunks and avoid fuzzed image. >> >> Reported-by: Yoon Jungyeon <jungyeon@xxxxxxxxxx> >> Link: https://bugzilla.kernel.org/show_bug.cgi?id=202751 >> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx> > > Actually since the reporter made images available I would like to have > those integrated into the fsck group so that those changes can be > validated and ensure further regressions do not creep up. > Add David into this discussion. This topic seems to be mentioned before. Should we put kernel test cases into btrfs-progs? We have fuzzed test groups for btrfs-progs mainly, but we don't really have kernel tests in btrfs-progs. Is it proper to put kernel-crashing tests into btrfs-progs? If not, where should we put such tests? And BTW, I originally wanted to craft the minimal image for those tests, but quite a lot of the image needs several corruption combined to hit the pitfall. I'm not sure if it's worthy to create the minimal image. Thanks, Qu
