From b243c375e08748c38edb47b29a46ec398381f554 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 25 May 2022 19:18:57 +0400 Subject: [PATCH] A more clarified comment for inotifyCount const. --- pkg/watcher/linux.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/watcher/linux.go b/pkg/watcher/linux.go index 972a2fa..fd8395e 100644 --- a/pkg/watcher/linux.go +++ b/pkg/watcher/linux.go @@ -11,8 +11,10 @@ import ( const CrDelMask uint32 = syscall.IN_CREATE | syscall.IN_DELETE // inotifyCount is amount of InotifyEvent structures -// we read in WatchForMask(). 16 was chosen experimentally, -// with lesser amount events are often missing. +// we read in WatchForMask(). 16 was chosen experimentally. +// Use of sparse files (with preoccupied space using Seek()) +// allows us to have a little buffer. With smaller number +// events are often missing. const inotifyCount = 16 type InotifyWatcher struct {