fs/TODO | 1 + fs/torrentfs.go | 11 ----------- fs/torrentfs_test.go | 7 +++---- diff --git a/fs/TODO b/fs/TODO new file mode 100644 index 0000000000000000000000000000000000000000..9ab12b52bf9b88f754caf91de03055d7ea17799f --- /dev/null +++ b/fs/TODO @@ -0,0 +1 @@ + * Reinstate InitAsyncRead, or find out if it's worth it. Upstream made it a PITA to apply it automatically. diff --git a/fs/torrentfs.go b/fs/torrentfs.go index 261dbc3870998f5a8bb44ee0b71dbc816b3c74c2..0c83974e60cbd76be05d8c5551651d863dff6ff2 100644 --- a/fs/torrentfs.go +++ b/fs/torrentfs.go @@ -36,18 +36,7 @@ } 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{} diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 1d5dc10048f71500e4fef5a7a0797d9cf34f7a13..98fa15501ab145118345b84934e8a39bbdce10d8 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -112,13 +112,12 @@ } 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 {