path: root/cmds-check.c
diff options
authorFilipe David Borba Manana <>2014-04-08 17:37:22 +0100
committerDavid Sterba <>2014-04-11 19:40:35 +0200
commitd2334781fde887ed4e541c6794970ae942f81f23 (patch)
treeeffc425dd503dfadee0e2457acfab21f5335d65f /cmds-check.c
parentb53b11a8b4fad541c6f95df836fde7cc14ce7a0f (diff)
Btrfs-progs: restore, for compressed extents don't read more bytes than needed
We need to read a number of bytes corresponding to the disk size of the file extent item, and not to the number of bytes in the num_bytes field. Normally disk_size is smaller than num_bytes (when using compression), except for files created with lzo compression in a kernel older then the one which introduced the following change: commit 59516f6017c589e7316418fda6128ba8f829a77f Author: Stefan Agner <> Date: Mon Jul 1 20:33:39 2013 +0200 Btrfs: return -1 when lzo compression makes data bigger With this fix the lzo code behaves like the zlib code by returning an error code when compression does not help reduce the size of the file. This is currently not a bug since the compressed size is checked again in the calling method compress_file_range. Signed-off-by: Filipe David Borba Manana <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-check.c')
0 files changed, 0 insertions, 0 deletions