diff --git a/lxd/fsmonitor/fsmonitor_interface.go b/lxd/fsmonitor/fsmonitor_interface.go index bce4d1fa3f4b..9d662fae7f80 100644 --- a/lxd/fsmonitor/fsmonitor_interface.go +++ b/lxd/fsmonitor/fsmonitor_interface.go @@ -1,5 +1,17 @@ package fsmonitor +const ( + // DriverNameFANotify is the name of the FANotify driver. + // + // FANotify should be preferred over INotify because it is more performant and does not need to recursively watch + // subdirectories. However, it is not possible to use fanotify if the specified path is not a mountpoint because we + // need to use the unix.FAN_MARK_FILESYSTEM flag for this functionality. + DriverNameFANotify = "fanotify" + + // DriverNameINotify is the name of the inotify driver. + DriverNameINotify = "inotify" +) + // FSMonitor represents a filesystem monitor. type FSMonitor interface { DriverName() string