Don't skip parts of a file when calling fiemap

A mis-incremented offset in the fiemap-processing code meant that
non-sparse portions of files were missed.
This commit is contained in:
Alex Young
2012-11-20 17:24:19 +00:00
parent 4f650d85c2
commit ed70dacf2f
4 changed files with 37 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ int build_allocation_map(struct bitset_mapping* allocation_map, int fd)
struct fiemap_extent *last = &fiemap->fm_extents[
fiemap->fm_mapped_extents-1
];
offset += last->fe_logical + last->fe_length;
offset = last->fe_logical + last->fe_length;
}
else {
offset += fiemap->fm_length;