diff options
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r-- | fs/btrfs/send.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 9c8d1a3fdc3a..9dde9717c1b9 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
@@ -1332,6 +1332,16 @@ verbose_printk(KERN_DEBUG "btrfs: find_extent_clone: data_offset=%llu, " | |||
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | if (cur_clone_root) { | 1334 | if (cur_clone_root) { |
1335 | if (compressed != BTRFS_COMPRESS_NONE) { | ||
1336 | /* | ||
1337 | * Offsets given by iterate_extent_inodes() are relative | ||
1338 | * to the start of the extent, we need to add logical | ||
1339 | * offset from the file extent item. | ||
1340 | * (See why at backref.c:check_extent_in_eb()) | ||
1341 | */ | ||
1342 | cur_clone_root->offset += btrfs_file_extent_offset(eb, | ||
1343 | fi); | ||
1344 | } | ||
1335 | *found = cur_clone_root; | 1345 | *found = cur_clone_root; |
1336 | ret = 0; | 1346 | ret = 0; |
1337 | } else { | 1347 | } else { |