Btrfs: don't use ram_bytes for uncompressed inline items
If we truncate an uncompressed inline item, ram_bytes isn't updated to reflect the new size. The fixe uses the size directly from the item header when reading uncompressed inlines, and also fixes truncate to update the size as it goes. Reported-by: Jens Axboe <axboe@fb.com> Signed-off-by: Chris Mason <clm@fb.com> CC: stable@vger.kernel.org
This commit is contained in:
@@ -249,7 +249,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
|
||||
BTRFS_FILE_EXTENT_INLINE) {
|
||||
printk(KERN_INFO "\t\tinline extent data "
|
||||
"size %u\n",
|
||||
btrfs_file_extent_inline_len(l, fi));
|
||||
btrfs_file_extent_inline_len(l, i, fi));
|
||||
break;
|
||||
}
|
||||
printk(KERN_INFO "\t\textent data disk bytenr %llu "
|
||||
|
Reference in New Issue
Block a user