mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
56c90ffa5e
The dm_stats_delete_region() call removes a region from the bound device, and, if the region is grouped, from the group leader group descriptor stored in aux_data. To do this requires a listed handle: previous versions of the library do not since no dependencies exist between regions without grouping. This leads to strange behaviour when a command built against an old version of the library is used with one supporting groups. Deleting a region with dmstats succeeds, but logs errors: # dmstats list Name RgID RgSta RgSiz #Areas ArSize ProgID vg_hex-root 0 0 1.00g 1 1.00g dmstats vg_hex-root 1 1.00g 1.00g 1 1.00g dmstats vg_hex-root 2 2.00g 1.00g 1 1.00g dmstats # dmstats delete --regionid 2 vg_hex/root Region ID 2 does not exist Could not delete statistics region. Command failed # dmstats list Name RgID RgSta RgSiz #Areas ArSize ProgID vg_hex-root 0 0 1.00g 1 1.00g dmstats vg_hex-root 1 1.00g 1.00g 1 1.00g dmstats This happens because the call to dm_stats_delete_region() is inside a dm_stats_walk_*() iterator: upon entry to the call, the iterator is at its end conditions and about to terminate. Due to the call to dm_stats_list() inside the function, it returns with an iterator at the beginning of a walk and performs a further iteration before exiting. This final loop makes a further attempt to delete the (already deleted) region, leading to the confusing error messages. |
||
---|---|---|
.. | ||
datastruct | ||
ioctl | ||
misc | ||
mm | ||
regex | ||
.exported_symbols | ||
.exported_symbols.Base | ||
.exported_symbols.DM_1_02_97 | ||
.exported_symbols.DM_1_02_98 | ||
.exported_symbols.DM_1_02_99 | ||
.exported_symbols.DM_1_02_100 | ||
.exported_symbols.DM_1_02_101 | ||
.exported_symbols.DM_1_02_103 | ||
.exported_symbols.DM_1_02_104 | ||
.exported_symbols.DM_1_02_105 | ||
.exported_symbols.DM_1_02_106 | ||
.exported_symbols.DM_1_02_107 | ||
.exported_symbols.DM_1_02_110 | ||
.exported_symbols.DM_1_02_113 | ||
.exported_symbols.DM_1_02_124 | ||
.exported_symbols.DM_1_02_128 | ||
.exported_symbols.DM_1_02_129 | ||
.exported_symbols.DM_1_02_131 | ||
.exported_symbols.DM_1_02_133 | ||
.exported_symbols.DM_1_02_135 | ||
libdevmapper.h | ||
libdevmapper.pc.in | ||
libdm-common.c | ||
libdm-common.h | ||
libdm-config.c | ||
libdm-deptree.c | ||
libdm-file.c | ||
libdm-report.c | ||
libdm-stats.c | ||
libdm-string.c | ||
libdm-targets.c | ||
libdm-timestamp.c | ||
Makefile.in |