]> sourceware.org Git - lvm2.git/commitdiff
dmstats: convert 'delete' to dm_stats_foreach_region()
authorBryn M. Reeves <bmr@redhat.com>
Tue, 5 Jul 2016 10:26:24 +0000 (11:26 +0100)
committerBryn M. Reeves <bmr@redhat.com>
Tue, 5 Jul 2016 18:53:16 +0000 (19:53 +0100)
tools/dmsetup.c

index 9d3d0a58d5a0c93cb2a0ceb9cffbe1dee5ae75af..6900ba20d49ce3b29c72f6b74a53f24b4bcc9092 100644 (file)
@@ -5029,16 +5029,14 @@ static int _stats_delete(CMD_ARGS)
                        goto out;
                }
        } else if (_switches[ALL_REGIONS_ARG]) {
-               dm_stats_walk_init(dms, DM_STATS_WALK_REGION);
-               dm_stats_walk_do(dms) {
+               dm_stats_foreach_region(dms) {
                        region_id = dm_stats_get_current_region(dms);
                        if (!dm_stats_delete_region(dms, region_id)) {
                                log_error("Could not delete statistics region.");
                                goto out;
                        }
                        log_info("Deleted statistics region %" PRIu64, region_id);
-                       dm_stats_walk_next(dms);
-               } dm_stats_walk_while(dms);
+               }
        } else {
                dm_stats_delete_region(dms, region_id);
                log_info("Deleted statistics region " FMTu64 ".\n", region_id);
This page took 0.046628 seconds and 5 git commands to generate.