fsImpl.Check: Bail out early on Linux.
To my great disappointment, I can't figure out a way to make this test reliable on Linux. Hopefully the cited mailing list thread will come through.geesefs-0-30-9
parent
6b4a733e56
commit
e859e64179
|
@ -17,6 +17,7 @@ package forgetfs
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"github.com/jacobsa/fuse"
|
"github.com/jacobsa/fuse"
|
||||||
"github.com/jacobsa/fuse/fuseops"
|
"github.com/jacobsa/fuse/fuseops"
|
||||||
|
@ -183,6 +184,16 @@ func (fs *fsImpl) Check() {
|
||||||
fs.mu.Lock()
|
fs.mu.Lock()
|
||||||
defer fs.mu.Unlock()
|
defer fs.mu.Unlock()
|
||||||
|
|
||||||
|
// On Linux we often don't receive forget ops, and never receive destroy ops
|
||||||
|
// (cf. http://goo.gl/EUbxEg, fuse-devel thread "Root inode lookup count").
|
||||||
|
// So there's not really much we can check here.
|
||||||
|
//
|
||||||
|
// TODO(jacobsa): Figure out why we don't receive destroy. If we can reliably
|
||||||
|
// receive it, we can treat it as "forget all".
|
||||||
|
if runtime.GOOS == "linux" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for k, v := range fs.inodes {
|
for k, v := range fs.inodes {
|
||||||
// Special case: we don't require the root inode to have reached zero.
|
// Special case: we don't require the root inode to have reached zero.
|
||||||
// OS X doesn't seem to send forgets for the root, and Linux only does
|
// OS X doesn't seem to send forgets for the root, and Linux only does
|
||||||
|
|
Loading…
Reference in New Issue