static int _stats_create_file(CMD_ARGS)
{
const char *alias, *program_id = DM_STATS_PROGRAM_ID;
+ const char *histogram = _string_args[BOUNDS_ARG];
uint64_t *regions, *region, count = 0;
+ struct dm_histogram *bounds = NULL;
char *path, *abspath = NULL;
int group, fd, precise;
struct dm_stats *dms;
return 0;
}
- if (_switches[BOUNDS_ARG]) {
- log_error("--bounds is not yet supported with --filemap.");
- return 0;
- }
-
/* _stats_create_file does not use _process_all() */
if (names) {
log_error("Device argument not compatible with --filemap.");
}
}
+ if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram)))
+ return_0;
+
if (_switches[PROGRAM_ID_ARG])
program_id = _string_args[PROGRAM_ID_ARG];
if (!strlen(program_id) && !_switches[FORCE_ARG])
}
regions = dm_stats_create_regions_from_fd(dms, fd, group, precise,
- NULL, alias);
+ bounds, alias);
if (close(fd))
log_error("Error closing %s", path);