Commit 968a761e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0e64f33a
...@@ -309,48 +309,9 @@ type BigFileData struct { ...@@ -309,48 +309,9 @@ type BigFileData struct {
} }
// /bigfile -> Mkdir receives client request to create /bigfile/<bigfileX>.
// ---- ctors ---- XXX to down?
func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return &BigFileRoot{
Node: nodefs.NewDefaultNode(),
zstor: zstor,
tab: make(map[zodb.Oid]*BigFileDir),
}
}
// func NewBigFileDir(oid zodb.Oid, root *BigFileRoot) *BigFileDir {
// bx := &BigFileDir{
// Node: nodefs.NewDefaultNode(),
// oid: oid,
// //root: root,
// }
//
// return bx
// }
// func NewBigFileHead(x *BigFileDir) *BigFileHead {
// f := &BigFileHead{Node: nodefs.NewDefaultNode(), x: x}
// f.data = NewBigFileData(f)
// //
// // XXX + .at // It creates <bigfileX>/head/data along the way.
//
// return f
// }
// func NewBigFileData(head *BigFileHead) *BigFileData {
// return &BigFileData{Node: nodefs.NewDefaultNode(), parent: head}
// }
// Mkdir receives client request to create /bigfile/<bigfileX>.
func (bfroot *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nodefs.Inode, fuse.Status) { func (bfroot *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nodefs.Inode, fuse.Status) {
oid, err := zodb.ParseOid(name) oid, err := zodb.ParseOid(name)
if err != nil { if err != nil {
...@@ -530,7 +491,11 @@ func main() { ...@@ -530,7 +491,11 @@ func main() {
// add entries to / // add entries to /
mkfile(root, ".wcfs", NewStaticFile([]byte(zurl))) mkfile(root, ".wcfs", NewStaticFile([]byte(zurl)))
mkdir(root, "bigfile", NewBigFileRoot(zstor)) mkdir(root, "bigfile", &BigFileRoot{
Node: nodefs.NewDefaultNode(),
zstor: zstor,
tab: make(map[zodb.Oid]*BigFileDir),
})
// TODO handle autoexit // TODO handle autoexit
_ = autoexit _ = autoexit
......
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