summaryrefslogtreecommitdiff
path: root/libdm/libdevmapper.h
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-03-13 11:44:05 +0000
committerBryn M. Reeves <bmr@redhat.com>2017-03-13 11:44:05 +0000
commit77a7ed065f09f5c9e3e50622de07717a5db2249a (patch)
tree747fc3b246feed4163059eed7def492aed18cbf3 /libdm/libdevmapper.h
parent9b0aba5fe9e6b22b85d7f6ff9f8fdef09db61bce (diff)
downloadlvm2-77a7ed065f09f5c9e3e50622de07717a5db2249a.tar.gz
dmfilemapd: ensure path argument is absolute
Require that the path argument to dmfilemapd be an absolute path and document this in tool output, libdevmapper.h and dmfilemapd.8. The check is also enforced by dm_stats_start_filemapd() to avoid forking a new process with an invalid path argument.
Diffstat (limited to 'libdm/libdevmapper.h')
-rw-r--r--libdm/libdevmapper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 9e0a83720..4bd32b4e1 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1421,6 +1421,10 @@ dm_filemapd_mode_t dm_filemapd_mode_from_string(const char *mode_str);
* detected, call dm_stats_update_regions_from_fd() to update the
* mapped regions for the file.
*
+ * The path provided to dm_stats_start_filemapd() must be an absolute
+ * path, and should reflect the path of 'fd' at the time that it was
+ * opened.
+ *
* The mode parameter controls the behaviour of the daemon when the
* file being monitored is unlinked or moved: see the comments for
* dm_filemapd_mode_t for a full description and possible values.