1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00
Bryn M. Reeves 30ad254d84 libdm: use correct region_id when cleaning up a failed filemap
If we fail to create a region during dm_stats_create_regions_from_fd(),
we must remove all regions that were created to do this to date. This
needs to loop over the table of region_id values that were populated
by _stats_create_file_regions() before the error.

The code for this failure case in the out_remove branch incorrectly
uses the table index as the region_id:

    for (--i; i != DM_STATS_REGION_NOT_PRESENT; i--) {
            if (!dm_stats_delete_region(dms, i))
                    log_error("Could not delete region " FMTu64 ".", i);
    }

This causes the cleanup code to delete a completely unrelated set
of regions (since the index here will always be nr_regions..0).

Fix it to pass the actual region_id stored in regions[i] instead.
2016-12-09 16:04:13 +00:00
..
2016-11-03 17:49:07 +01:00
2016-02-23 12:25:25 +01:00
2016-11-23 17:55:03 +01:00
2015-08-17 17:20:14 +01:00
2016-01-21 12:11:37 +01:00
2016-09-13 09:24:38 +02:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00