1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: fix start of file detection in _stats_map_extents()

This commit is contained in:
Bryn M. Reeves 2016-12-13 18:14:13 +00:00
parent eb65572217
commit 930b0b4c9e

View File

@ -4287,7 +4287,7 @@ static uint64_t _stats_map_extents(struct dm_pool *mem,
* If the file only has a single extent, no boundary is ever
* detected to trigger addition of the first extent.
*/
if (fm_ext[i].fe_logical == 0)
if (fm_ext[i - 1].fe_logical == 0)
_stats_add_extent(mem, fm_pending, nr_extents);
fiemap->fm_start = (fm_ext[i - 1].fe_logical +