Commit 657da1d0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e30ab8a1
...@@ -27,9 +27,9 @@ import ( ...@@ -27,9 +27,9 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
) )
// asctx represents fuse context as context.Context ready for interruption handling. // asctx represents fuse context as context.Context ready for interrupt handling.
// //
// XXX temp. only after proper interrupt handling it not yet merged into go-fuse. // XXX temp. only after proper interrupt handling is not yet merged into go-fuse.
// https://github.com/hanwen/go-fuse/pull/15 // https://github.com/hanwen/go-fuse/pull/15
func asctx(fctx *fuse.Context) context.Context { func asctx(fctx *fuse.Context) context.Context {
// FIXME stub // FIXME stub
......
...@@ -272,31 +272,30 @@ type BigFileRoot struct { ...@@ -272,31 +272,30 @@ type BigFileRoot struct {
zstor zodb.IStorage zstor zodb.IStorage
mu sync.Mutex mu sync.Mutex
tab map[zodb.Oid]*BigFileX tab map[zodb.Oid]*BigFileDir
} }
// BigFileX represents "/bigfile/<bigfileX>" // BigFileDir represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ? type BigFileDir struct {
type BigFileX struct {
nodefs.Node nodefs.Node
oid zodb.Oid oid zodb.Oid
root *BigFileRoot root *BigFileRoot
} }
// BigFileHead represents "/bigfile/<bigfileX>/head" // BigFileHead represents "/bigfile/<bigfileX>/head"
// XXX -> BigFileRev (with head | @tid) ?
type BigFileHead struct { type BigFileHead struct {
nodefs.Node nodefs.Node
x *BigFileX x *BigFileDir
data *BigFile data *BigFileData
//at *BigFileAt //at *BigFileAt
//inv *BigFileInvalidations //inv *BigFileInvalidations
} }
// BigFile represents "/bigfile/<bigfileX>/head/data" // BigFileData represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ? // XXX also @<tidX>/data ?
// XXX -> BigFileData ? type BigFileData struct {
type BigFile struct {
nodefs.Node nodefs.Node
parent *BigFileHead // XXX name parent *BigFileHead // XXX name
...@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot { ...@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return &BigFileRoot{ return &BigFileRoot{
Node: nodefs.NewDefaultNode(), Node: nodefs.NewDefaultNode(),
zstor: zstor, zstor: zstor,
tab: make(map[zodb.Oid]*BigFileX), tab: make(map[zodb.Oid]*BigFileDir),
} }
} }
func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX { func NewBigFileDir(oid zodb.Oid, root *BigFileRoot) *BigFileDir {
bx := &BigFileX{ bx := &BigFileDir{
Node: nodefs.NewDefaultNode(), Node: nodefs.NewDefaultNode(),
oid: oid, oid: oid,
root: root, root: root,
...@@ -331,9 +330,9 @@ func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX { ...@@ -331,9 +330,9 @@ func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX {
func NewBigFileHead(x *BigFileX) *BigFileHead { func NewBigFileHead(x *BigFileDir) *BigFileHead {
f := &BigFileHead{Node: nodefs.NewDefaultNode(), x: x} f := &BigFileHead{Node: nodefs.NewDefaultNode(), x: x}
f.data = NewBigFile(f) f.data = NewBigFileData(f)
// XXX + .at // XXX + .at
...@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead { ...@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead {
} }
func NewBigFile(head *BigFileHead) *BigFile { func NewBigFileData(head *BigFileHead) *BigFileData {
return &BigFile{Node: nodefs.NewDefaultNode(), parent: head} return &BigFileData{Node: nodefs.NewDefaultNode(), parent: head}
} }
...@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod ...@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod
// Read implements reading from /bigfile/<bigfileX>/head/data. // Read implements reading from /bigfile/<bigfileX>/head/data.
// XXX and from /bigfile/<bigfileX>/@<tidX>/data. // XXX and from /bigfile/<bigfileX>/@<tidX>/data.
/* /*
func (bf *BigFile) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (fuse.ReadResult, fuse.Status) { func (bf *BigFileData) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (fuse.ReadResult, fuse.Status) {
.at .at
.topoid .topoid
// XXX // XXX
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment