Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
e30ab8a1
Commit
e30ab8a1
authored
Sep 30, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d5d3842c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
wcfs/__init__.py
wcfs/__init__.py
+1
-1
wcfs/misc.go
wcfs/misc.go
+11
-0
wcfs/wcfs.go
wcfs/wcfs.go
+4
-2
No files found.
wcfs/__init__.py
View file @
e30ab8a1
...
@@ -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 i
s
zurl is zconfig://... ? -> then we have to look inside?
# XXX what i
f
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
)
...
...
wcfs/misc.go
View file @
e30ab8a1
...
@@ -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
...
...
wcfs/wcfs.go
View file @
e30ab8a1
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment