path: root/cmds-check.c
diff options
authorFilipe David Borba Manana <>2014-04-08 18:25:43 +0100
committerDavid Sterba <>2014-04-11 19:47:29 +0200
commitc17d0a73c11d7cdbdf1582408ec6d168876160ea (patch)
tree63e639784898055188a608ff08ab8f54bad79d62 /cmds-check.c
parentd2334781fde887ed4e541c6794970ae942f81f23 (diff)
Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version
The following kernel commit changed the definition of the inline function btrfs_file_extent_inline_len(): commit 514ac8ad8793a097c0c9d89202c642479d6dfa34 Author: Chris Mason <> Date: Fri Jan 3 21:07:00 2014 -0800 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. Not having this new definition implies that the restore tool might misbehave when restoring files with an inline extent that got truncated on a kernel older than release 3.14. Signed-off-by: Filipe David Borba Manana <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-check.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-check.c b/cmds-check.c
index 288906fc..d195e7a4 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -1166,7 +1166,7 @@ static int process_file_extent(struct btrfs_root *root,
extent_type = btrfs_file_extent_type(eb, fi);
if (extent_type == BTRFS_FILE_EXTENT_INLINE) {
- num_bytes = btrfs_file_extent_inline_len(eb, fi);
+ num_bytes = btrfs_file_extent_inline_len(eb, slot, fi);
if (num_bytes == 0)
rec->errors |= I_ERR_BAD_FILE_EXTENT;
rec->found_size += num_bytes;