projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94e03a7
)
Make use of FUSE readahead
author
Matt Joiner <anacrolix@gmail.com>
Wed, 27 Aug 2014 22:08:59 +0000 (08:08 +1000)
committer
Matt Joiner <anacrolix@gmail.com>
Wed, 27 Aug 2014 22:08:59 +0000 (08:08 +1000)
fs/torrentfs.go
patch
|
blob
|
history
diff --git
a/fs/torrentfs.go
b/fs/torrentfs.go
index 41877908a7e246b00e1c4d6e35b204b1252ac2fd..3d712a19266e8cc590c9b926eca1e25a04c032cd 100644
(file)
--- a/
fs/torrentfs.go
+++ b/
fs/torrentfs.go
@@
-30,7
+30,18
@@
type torrentFS struct {
mu sync.Mutex
}
-var _ fusefs.FSDestroyer = &torrentFS{}
+var (
+ _ fusefs.FSDestroyer = &torrentFS{}
+ _ fusefs.FSIniter = &torrentFS{}
+)
+
+func (fs *torrentFS) Init(req *fuse.InitRequest, resp *fuse.InitResponse, intr fusefs.Intr) fuse.Error {
+ log.Print(req)
+ log.Print(resp)
+ resp.MaxReadahead = req.MaxReadahead
+ resp.Flags |= fuse.InitAsyncRead
+ return nil
+}
var _ fusefs.NodeForgetter = rootNode{}