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
Show 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():
#
# it also makes sure the mountpoint exists.
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.
m
=
hashlib
.
sha1
()
m
.
update
(
zurl
)
...
...
wcfs/misc.go
View file @
e30ab8a1
...
...
@@ -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
...
...
wcfs/wcfs.go
View file @
e30ab8a1
...
...
@@ -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
...
...
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