btrfs-progs/check
Qu Wenruo 3c042605db btrfs-progs: Get rid of the confusing btrfs_file_extent_inline_len()
[BUG]
If one uncompressed inline extent has incorrect ram_bytes, neither btrfs
check nor dump-tree could detect such corruption.

[CAUSE]
Every caller tries to read inline extent ram_bytes is using
btrfs_file_extent_inline_len(), other than directly calling
btrfs_file_extent_ram_bytes().

For compressed extent, it's just calling btrfs_file_extent_ram_bytes().
However for uncompressed extent, it falls back to
btrfs_file_extent_inline_item_len(), makes us unable to detect anything
wrong in ram_bytes.

[FIX]
Just get rid of such confusing btrfs_file_extent_inline_len() function.

Reported-by: Steve Leung <sjleung@shaw.ca>
Tested-by: Steve Leung <sjleung@shaw.ca>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-08-06 15:00:34 +02:00
..
main.c btrfs-progs: Get rid of the confusing btrfs_file_extent_inline_len() 2018-08-06 15:00:34 +02:00
mode-common.c btrfs-progs: check: Initialize all filed of btrfs_inode_item in insert_inode_item() 2018-06-07 16:37:40 +02:00
mode-common.h btrfs-progs: check: lowmem: exclude extents of metadata blocks 2018-06-07 16:35:55 +02:00
mode-lowmem.c btrfs-progs: Get rid of the confusing btrfs_file_extent_inline_len() 2018-08-06 15:00:34 +02:00
mode-lowmem.h btrfs-progs: check: lowmem: check symlinks with append/immutable flags 2018-06-07 16:37:38 +02:00
mode-original.h btrfs-progs: check: check symlinks with append/immutable flags 2018-06-07 16:37:37 +02:00