mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: use 'goto_bad' if extent pool allocation fails
Generate a backtrace if unable to extend the extent table.
This commit is contained in:
parent
feb69966d4
commit
61cb58e549
@ -4208,7 +4208,7 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
|
|||||||
tot_extents++;
|
tot_extents++;
|
||||||
if (!_stats_add_extent(mem, fm_ext + i,
|
if (!_stats_add_extent(mem, fm_ext + i,
|
||||||
tot_extents - 1))
|
tot_extents - 1))
|
||||||
goto bad;
|
goto_bad;
|
||||||
} else {
|
} else {
|
||||||
expected = 0;
|
expected = 0;
|
||||||
if (!tot_extents)
|
if (!tot_extents)
|
||||||
@ -4216,7 +4216,7 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
|
|||||||
if (fm_ext[i].fe_logical == 0)
|
if (fm_ext[i].fe_logical == 0)
|
||||||
if (!_stats_add_extent(mem, fm_ext + i,
|
if (!_stats_add_extent(mem, fm_ext + i,
|
||||||
tot_extents - 1))
|
tot_extents - 1))
|
||||||
goto bad;
|
goto_bad;
|
||||||
}
|
}
|
||||||
num += tot_extents;
|
num += tot_extents;
|
||||||
if (fm_ext[i].fe_flags & FIEMAP_EXTENT_LAST)
|
if (fm_ext[i].fe_flags & FIEMAP_EXTENT_LAST)
|
||||||
|
Loading…
Reference in New Issue
Block a user