]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Upstream bazil.org/fuse changed again ಠ_ಠ
authorMatt Joiner <anacrolix@gmail.com>
Mon, 22 Jun 2015 13:02:29 +0000 (23:02 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 22 Jun 2015 13:02:29 +0000 (23:02 +1000)
fs/TODO [new file with mode: 0644]
fs/torrentfs.go
fs/torrentfs_test.go

diff --git a/fs/TODO b/fs/TODO
new file mode 100644 (file)
index 0000000..9ab12b5
--- /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.
index 261dbc3870998f5a8bb44ee0b71dbc816b3c74c2..0c83974e60cbd76be05d8c5551651d863dff6ff2 100644 (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{}
index 1d5dc10048f71500e4fef5a7a0797d9cf34f7a13..98fa15501ab145118345b84934e8a39bbdce10d8 100644 (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 {