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

.

parent e30ab8a1
......@@ -27,9 +27,9 @@ import (
"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
func asctx(fctx *fuse.Context) context.Context {
// FIXME stub
......
......@@ -272,31 +272,30 @@ type BigFileRoot struct {
zstor zodb.IStorage
mu sync.Mutex
tab map[zodb.Oid]*BigFileX
tab map[zodb.Oid]*BigFileDir
}
// BigFileX represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ?
type BigFileX struct {
// BigFileDir represents "/bigfile/<bigfileX>"
type BigFileDir struct {
nodefs.Node
oid zodb.Oid
root *BigFileRoot
}
// BigFileHead represents "/bigfile/<bigfileX>/head"
// XXX -> BigFileRev (with head | @tid) ?
type BigFileHead struct {
nodefs.Node
x *BigFileX
x *BigFileDir
data *BigFile
data *BigFileData
//at *BigFileAt
//inv *BigFileInvalidations
}
// BigFile represents "/bigfile/<bigfileX>/head/data"
// BigFileData represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ?
// XXX -> BigFileData ?
type BigFile struct {
type BigFileData struct {
nodefs.Node
parent *BigFileHead // XXX name
......@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return &BigFileRoot{
Node: nodefs.NewDefaultNode(),
zstor: zstor,
tab: make(map[zodb.Oid]*BigFileX),
tab: make(map[zodb.Oid]*BigFileDir),
}
}
func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX {
bx := &BigFileX{
func NewBigFileDir(oid zodb.Oid, root *BigFileRoot) *BigFileDir {
bx := &BigFileDir{
Node: nodefs.NewDefaultNode(),
oid: oid,
root: root,
......@@ -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.data = NewBigFile(f)
f.data = NewBigFileData(f)
// XXX + .at
......@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead {
}
func NewBigFile(head *BigFileHead) *BigFile {
return &BigFile{Node: nodefs.NewDefaultNode(), parent: head}
func NewBigFileData(head *BigFileHead) *BigFileData {
return &BigFileData{Node: nodefs.NewDefaultNode(), parent: head}
}
......@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod
// Read implements reading from /bigfile/<bigfileX>/head/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
.topoid
// 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