diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2016-12-16 13:43:40 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2016-12-16 13:44:42 +0000 |
commit | 9e3ef29562b46a76b6f4d1f95a75ced2eba102d9 (patch) | |
tree | 06e21f0921e1a637270bd58d3bb171e46bfa015f | |
parent | 146edfcdaa441959235c200ab70e2a72dd368620 (diff) | |
download | lvm2-dev-bmr-dmstats-dmfilemapd-fanotify.tar.gz |
dmstats: launch dmfilemapd when creating file mapped groupsdev-bmr-dmstats-dmfilemapd-fanotify
-rw-r--r-- | tools/dmsetup.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |