Commit e30ab8a1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d5d3842c
......@@ -251,7 +251,7 @@ def _wcfs_exe():
#
# it also makes sure the mountpoint exists.
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.
m = hashlib.sha1()
m.update(zurl)
......
......@@ -21,10 +21,21 @@ package main
// misc utilities
import (
"context"
"github.com/hanwen/go-fuse/fuse"
"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.
type StaticFile struct {
nodefs.Node
......
......@@ -276,6 +276,7 @@ type BigFileRoot struct {
}
// BigFileX represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ?
type BigFileX struct {
nodefs.Node
oid zodb.Oid
......@@ -294,6 +295,7 @@ type BigFileHead struct {
// BigFile represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ?
// XXX -> BigFileData ?
type BigFile struct {
nodefs.Node
parent *BigFileHead // XXX name
......@@ -348,7 +350,7 @@ func NewBigFile(head *BigFileHead) *BigFile {
// 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)
if err != nil {
log.Printf("/bigfile: mkdir %q: not-oid", name)
......@@ -365,7 +367,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs
br.mu.Unlock()
ctx := context.Background() // XXX ok?
ctx := asctx(fctx)
_ = ctx
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