From c76f3c1eade2a5bcf844644401de7208a952beaf Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 22 Jun 2015 23:02:29 +1000 Subject: [PATCH] =?UTF-8?q?Upstream=20bazil.org/fuse=20changed=20again=20?= =?UTF-8?q?=E0=B2=A0=5F=E0=B2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fs/TODO | 1 + fs/torrentfs.go | 11 ----------- fs/torrentfs_test.go | 7 +++---- 3 files changed, 4 insertions(+), 15 deletions(-) create mode 100644 fs/TODO diff --git a/fs/TODO b/fs/TODO new file mode 100644 index 00000000..9ab12b52 --- /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 261dbc38..0c83974e 100644 --- a/fs/torrentfs.go +++ b/fs/torrentfs.go @@ -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{} diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 1d5dc100..98fa1550 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -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 {