Upstream bazil.org/fuse changed again ಠ_ಠ

This commit is contained in:
Matt Joiner 2015-06-22 23:02:29 +10:00
parent 6d00549641
commit c76f3c1ead
3 changed files with 4 additions and 15 deletions

1
fs/TODO Normal file
View File

@ -0,0 +1 @@
* Reinstate InitAsyncRead, or find out if it's worth it. Upstream made it a PITA to apply it automatically.

View File

@ -36,18 +36,7 @@ type TorrentFS struct {
var (
_ fusefs.FSDestroyer = &TorrentFS{}
_ fusefs.FSIniter = &TorrentFS{}
)
func (fs *TorrentFS) Init(ctx context.Context, req *fuse.InitRequest, resp *fuse.InitResponse) error {
log.Print(req)
log.Print(resp)
resp.MaxReadahead = req.MaxReadahead
resp.Flags |= fuse.InitAsyncRead
return nil
}
var (
_ fusefs.NodeForgetter = rootNode{}
_ fusefs.HandleReadDirAller = rootNode{}
_ fusefs.HandleReadDirAller = dirNode{}

View File

@ -112,13 +112,12 @@ func TestUnmountWedged(t *testing.T) {
t.Fatal(msg)
}
go func() {
server := fusefs.Server{
FS: fs,
server := fusefs.New(fuseConn, &fusefs.Config{
Debug: func(msg interface{}) {
t.Log(msg)
},
}
server.Serve(fuseConn)
})
server.Serve(fs)
}()
<-fuseConn.Ready
if err := fuseConn.MountError; err != nil {