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
657da1d0
Commit
657da1d0
authored
Oct 01, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e30ab8a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
wcfs/misc.go
wcfs/misc.go
+2
-2
wcfs/wcfs.go
wcfs/wcfs.go
+16
-17
No files found.
wcfs/misc.go
View file @
657da1d0
...
...
@@ -27,9 +27,9 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
// asctx represents fuse context as context.Context ready for interrupt
ion
handling.
// asctx represents fuse context as context.Context ready for interrupt handling.
//
// XXX temp. only after proper interrupt handling i
t
not yet merged into go-fuse.
// XXX temp. only after proper interrupt handling i
s
not yet merged into go-fuse.
// https://github.com/hanwen/go-fuse/pull/15
func
asctx
(
fctx
*
fuse
.
Context
)
context
.
Context
{
// FIXME stub
...
...
wcfs/wcfs.go
View file @
657da1d0
...
...
@@ -272,31 +272,30 @@ type BigFileRoot struct {
zstor
zodb
.
IStorage
mu
sync
.
Mutex
tab
map
[
zodb
.
Oid
]
*
BigFile
X
tab
map
[
zodb
.
Oid
]
*
BigFile
Dir
}
// BigFileX represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ?
type
BigFileX
struct
{
// BigFileDir represents "/bigfile/<bigfileX>"
type
BigFileDir
struct
{
nodefs
.
Node
oid
zodb
.
Oid
root
*
BigFileRoot
}
// BigFileHead represents "/bigfile/<bigfileX>/head"
// XXX -> BigFileRev (with head | @tid) ?
type
BigFileHead
struct
{
nodefs
.
Node
x
*
BigFile
X
x
*
BigFile
Dir
data
*
BigFile
data
*
BigFile
Data
//at *BigFileAt
//inv *BigFileInvalidations
}
// BigFile represents "/bigfile/<bigfileX>/head/data"
// BigFile
Data
represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ?
// XXX -> BigFileData ?
type
BigFile
struct
{
type
BigFileData
struct
{
nodefs
.
Node
parent
*
BigFileHead
// XXX name
...
...
@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return
&
BigFileRoot
{
Node
:
nodefs
.
NewDefaultNode
(),
zstor
:
zstor
,
tab
:
make
(
map
[
zodb
.
Oid
]
*
BigFile
X
),
tab
:
make
(
map
[
zodb
.
Oid
]
*
BigFile
Dir
),
}
}
func
NewBigFile
X
(
oid
zodb
.
Oid
,
root
*
BigFileRoot
)
*
BigFileX
{
bx
:=
&
BigFile
X
{
func
NewBigFile
Dir
(
oid
zodb
.
Oid
,
root
*
BigFileRoot
)
*
BigFileDir
{
bx
:=
&
BigFile
Dir
{
Node
:
nodefs
.
NewDefaultNode
(),
oid
:
oid
,
root
:
root
,
...
...
@@ -331,9 +330,9 @@ func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX {
func
NewBigFileHead
(
x
*
BigFile
X
)
*
BigFileHead
{
func
NewBigFileHead
(
x
*
BigFile
Dir
)
*
BigFileHead
{
f
:=
&
BigFileHead
{
Node
:
nodefs
.
NewDefaultNode
(),
x
:
x
}
f
.
data
=
NewBigFile
(
f
)
f
.
data
=
NewBigFile
Data
(
f
)
// XXX + .at
...
...
@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead {
}
func
NewBigFile
(
head
*
BigFileHead
)
*
BigFile
{
return
&
BigFile
{
Node
:
nodefs
.
NewDefaultNode
(),
parent
:
head
}
func
NewBigFile
Data
(
head
*
BigFileHead
)
*
BigFileData
{
return
&
BigFile
Data
{
Node
:
nodefs
.
NewDefaultNode
(),
parent
:
head
}
}
...
...
@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod
// Read implements reading from /bigfile/<bigfileX>/head/data.
// XXX and from /bigfile/<bigfileX>/@<tidX>/data.
/*
func (bf *BigFile) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (fuse.ReadResult, fuse.Status) {
func (bf *BigFile
Data
) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (fuse.ReadResult, fuse.Status) {
.at
.topoid
// XXX
...
...
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