From 9e3ef29562b46a76b6f4d1f95a75ced2eba102d9 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 16 Dec 2016 13:43:40 +0000 Subject: dmstats: launch dmfilemapd when creating file mapped groups --- tools/dmsetup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 3cc50459d..396e41f27 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -4999,6 +4999,7 @@ static int _stats_create_file(CMD_ARGS) const char *alias, *program_id = DM_STATS_PROGRAM_ID; const char *bounds_str = _string_args[BOUNDS_ARG]; uint64_t *regions, *region, count = 0; + int verbose = _switches[VERBOSE_ARG]; struct dm_histogram *bounds = NULL; char *path, *abspath = NULL; struct dm_stats *dms = NULL; @@ -5086,6 +5087,10 @@ static int _stats_create_file(CMD_ARGS) regions = dm_stats_create_regions_from_fd(dms, fd, group, precise, bounds, alias); + if (!_switches[NOMONITOR_ARG] && group) + if (!dm_stats_start_filemapd(fd, regions[0], abspath, 0, verbose)) + log_warn("Failed to start filemap monitoring daemon."); + if (close(fd)) log_error("Error closing %s", abspath); -- cgit v1.2.1