Skip to content

Commit

Permalink
lxd/fsmonitor: Add constants for driver names.
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Laing <mark.laing@canonical.com>
  • Loading branch information
markylaing committed Sep 25, 2024
1 parent cb8a515 commit 8b68296
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lxd/fsmonitor/fsmonitor_interface.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8b68296

Please sign in to comment.