File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ func NewListingCache(period time.Duration, dir string) *ListingCache {
58
58
// updated according to the frequency specified by the period. It will run until
59
59
// the context is cancelled.
60
60
func (l * ListingCache ) Run (ctx context.Context ) {
61
+ klog .Infof ("Starting symlink cache watcher for directory %s with period %s" , l .dir , l .period )
62
+
61
63
// Start the loop that runs every minute
62
64
ticker := time .NewTicker (l .period )
63
65
defer ticker .Stop ()
@@ -150,6 +152,9 @@ func newLinkCache() *linkCache {
150
152
}
151
153
}
152
154
155
+ // AddOrUpdateDevice adds a new device or updates an existing device in the cache.
156
+ // It ignores partition symlinks as they are considered noise for logging purposes.
157
+ // If the symlink already exists and the real path has changed, it logs the update.
153
158
func (d * linkCache ) AddOrUpdateDevice (symlink , realPath string ) {
154
159
// Ignore partitions, which are noise as far as our logging is concerned.
155
160
// Expression: -part[0-9]+$
You can’t perform that action at this time.
0 commit comments