On 2019/5/16 下午8:57, David Sterba wrote: > On Fri, May 03, 2019 at 08:30:54AM +0800, Qu Wenruo wrote: >> Under certain condition, we could have strange file extent item in log >> tree like: >> >> item 18 key (69599 108 397312) itemoff 15208 itemsize 53 >> extent data disk bytenr 0 nr 0 >> extent data offset 0 nr 18446744073709547520 ram 18446744073709547520 >> >> The num_bytes and ram_bytes part overflow. >> >> For num_bytes part, we can detect such overflow along with file offset >> (key->offset), as file_offset + num_bytes should never go beyond u64 >> max. >> >> For ram_bytes part, it's about the decompressed size of the extent, not >> directly related to the size. >> In theory is OK to have super large value, and put extra >> limitation on ram bytes may cause unexpected false alert. >> >> So in tree-checker, we only check if the file offset and num bytes >> overflow. >> >> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx> > > So this patch can be dropped because of "Btrfs: tree-checker: detect > file extent items with overlapping ranges", right? > Nope, there is still a case can be detected by this patch only. If the last file extent overflow, that patch can not detect it. Although that patch has a much better coverage than this one. Thanks, Qu
Attachment:
signature.asc
Description: OpenPGP digital signature
