Commit e30ab8a1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d5d3842c
...@@ -251,7 +251,7 @@ def _wcfs_exe(): ...@@ -251,7 +251,7 @@ def _wcfs_exe():
# #
# it also makes sure the mountpoint exists. # it also makes sure the mountpoint exists.
def _mntpt_4zurl(zurl): def _mntpt_4zurl(zurl):
# XXX what is zurl is zconfig://... ? -> then we have to look inside? # XXX what if zurl is zconfig://... ? -> then we have to look inside?
# -> _zstor_2zurl extracts zurl in canonical form and zconfig:// is not possible there. # -> _zstor_2zurl extracts zurl in canonical form and zconfig:// is not possible there.
m = hashlib.sha1() m = hashlib.sha1()
m.update(zurl) m.update(zurl)
......
...@@ -21,10 +21,21 @@ package main ...@@ -21,10 +21,21 @@ package main
// misc utilities // misc utilities
import ( import (
"context"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"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.
//
// XXX temp. only after proper interrupt handling it not yet merged into go-fuse.
// https://github.com/hanwen/go-fuse/pull/15
func asctx(fctx *fuse.Context) context.Context {
// FIXME stub
return context.Background()
}
// StaticFile is a Node for file with static data. // StaticFile is a Node for file with static data.
type StaticFile struct { type StaticFile struct {
nodefs.Node nodefs.Node
......
...@@ -276,6 +276,7 @@ type BigFileRoot struct { ...@@ -276,6 +276,7 @@ type BigFileRoot struct {
} }
// BigFileX represents "/bigfile/<bigfileX>" // BigFileX represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ?
type BigFileX struct { type BigFileX struct {
nodefs.Node nodefs.Node
oid zodb.Oid oid zodb.Oid
...@@ -294,6 +295,7 @@ type BigFileHead struct { ...@@ -294,6 +295,7 @@ type BigFileHead struct {
// BigFile represents "/bigfile/<bigfileX>/head/data" // BigFile represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ? // XXX also @<tidX>/data ?
// XXX -> BigFileData ?
type BigFile struct { type BigFile struct {
nodefs.Node nodefs.Node
parent *BigFileHead // XXX name parent *BigFileHead // XXX name
...@@ -348,7 +350,7 @@ func NewBigFile(head *BigFileHead) *BigFile { ...@@ -348,7 +350,7 @@ func NewBigFile(head *BigFileHead) *BigFile {
// Mkdir receives client request to create /bigfile/<bigfileX>. // Mkdir receives client request to create /bigfile/<bigfileX>.
func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs.Inode, fuse.Status) { func (br *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 {
log.Printf("/bigfile: mkdir %q: not-oid", name) log.Printf("/bigfile: mkdir %q: not-oid", name)
...@@ -365,7 +367,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs ...@@ -365,7 +367,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs
br.mu.Unlock() br.mu.Unlock()
ctx := context.Background() // XXX ok? ctx := asctx(fctx)
_ = ctx _ = ctx
return nil, fuse.ENOSYS // XXX temp return nil, fuse.ENOSYS // XXX temp
......
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