Commit 15487a16 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Print message when dropping cache in CachingFileSystem.

parent b8e3280d
...@@ -3,6 +3,7 @@ package unionfs ...@@ -3,6 +3,7 @@ package unionfs
import ( import (
"fmt" "fmt"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"log"
"os" "os"
"strings" "strings"
) )
...@@ -145,6 +146,7 @@ func (me *CachingFileSystem) Name() string { ...@@ -145,6 +146,7 @@ func (me *CachingFileSystem) Name() string {
func (me *CachingFileSystem) Open(name string, flags uint32) (f fuse.File, status fuse.Status) { func (me *CachingFileSystem) Open(name string, flags uint32) (f fuse.File, status fuse.Status) {
if flags&fuse.O_ANYWRITE != 0 && name == _DROP_CACHE { if flags&fuse.O_ANYWRITE != 0 && name == _DROP_CACHE {
log.Println("Dropping cache for", me.Name())
me.DropCache() me.DropCache()
} }
return me.FileSystem.Open(name, flags) return me.FileSystem.Open(name, flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment