diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-06-02 15:22:49 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-06-07 18:15:19 +0200 |
commit | 9aae31f1248f68c2f6e19b8616f043e539723b9f (patch) | |
tree | d9deeaf0d930546a2152f9b9f503a38089c80b95 /radix-tree.c | |
parent | db6f9251e509107755c7014e7358469409a0d5fe (diff) |
btrfs-progs: convert: Fix a bug which fails to insert hole file extent
When copying inode, if there is a file referring part of a hole range,
convert will fail.
The problem is, when calculating real extent bytenr, it doesn't check if
the original extent is a hole.
In case the orinal extent is a hole, we still calculate bytenr using
file_pos - found_extent_file_pos, causing non-zero value, and later
btrfs_record_file_extent() detects that we are pointing to non-exist
extent and aborts convert.
Fix it by checking the disk_bytenr before calculating real disk bytenr.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'radix-tree.c')
0 files changed, 0 insertions, 0 deletions