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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
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 (
...
@@ -27,9 +27,9 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
"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
// https://github.com/hanwen/go-fuse/pull/15
func
asctx
(
fctx
*
fuse
.
Context
)
context
.
Context
{
func
asctx
(
fctx
*
fuse
.
Context
)
context
.
Context
{
// FIXME stub
// FIXME stub
...
...
wcfs/wcfs.go
View file @
657da1d0
...
@@ -272,31 +272,30 @@ type BigFileRoot struct {
...
@@ -272,31 +272,30 @@ type BigFileRoot struct {
zstor
zodb
.
IStorage
zstor
zodb
.
IStorage
mu
sync
.
Mutex
mu
sync
.
Mutex
tab
map
[
zodb
.
Oid
]
*
BigFile
X
tab
map
[
zodb
.
Oid
]
*
BigFile
Dir
}
}
// BigFileX represents "/bigfile/<bigfileX>"
// BigFileDir represents "/bigfile/<bigfileX>"
// XXX -> BigFileDir ?
type
BigFileDir
struct
{
type
BigFileX
struct
{
nodefs
.
Node
nodefs
.
Node
oid
zodb
.
Oid
oid
zodb
.
Oid
root
*
BigFileRoot
root
*
BigFileRoot
}
}
// BigFileHead represents "/bigfile/<bigfileX>/head"
// BigFileHead represents "/bigfile/<bigfileX>/head"
// XXX -> BigFileRev (with head | @tid) ?
type
BigFileHead
struct
{
type
BigFileHead
struct
{
nodefs
.
Node
nodefs
.
Node
x
*
BigFile
X
x
*
BigFile
Dir
data
*
BigFile
data
*
BigFile
Data
//at *BigFileAt
//at *BigFileAt
//inv *BigFileInvalidations
//inv *BigFileInvalidations
}
}
// BigFile represents "/bigfile/<bigfileX>/head/data"
// BigFile
Data
represents "/bigfile/<bigfileX>/head/data"
// XXX also @<tidX>/data ?
// XXX also @<tidX>/data ?
// XXX -> BigFileData ?
type
BigFileData
struct
{
type
BigFile
struct
{
nodefs
.
Node
nodefs
.
Node
parent
*
BigFileHead
// XXX name
parent
*
BigFileHead
// XXX name
...
@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
...
@@ -315,12 +314,12 @@ func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return
&
BigFileRoot
{
return
&
BigFileRoot
{
Node
:
nodefs
.
NewDefaultNode
(),
Node
:
nodefs
.
NewDefaultNode
(),
zstor
:
zstor
,
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
{
func
NewBigFile
Dir
(
oid
zodb
.
Oid
,
root
*
BigFileRoot
)
*
BigFileDir
{
bx
:=
&
BigFile
X
{
bx
:=
&
BigFile
Dir
{
Node
:
nodefs
.
NewDefaultNode
(),
Node
:
nodefs
.
NewDefaultNode
(),
oid
:
oid
,
oid
:
oid
,
root
:
root
,
root
:
root
,
...
@@ -331,9 +330,9 @@ func NewBigFileX(oid zodb.Oid, root *BigFileRoot) *BigFileX {
...
@@ -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
:=
&
BigFileHead
{
Node
:
nodefs
.
NewDefaultNode
(),
x
:
x
}
f
.
data
=
NewBigFile
(
f
)
f
.
data
=
NewBigFile
Data
(
f
)
// XXX + .at
// XXX + .at
...
@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead {
...
@@ -341,8 +340,8 @@ func NewBigFileHead(x *BigFileX) *BigFileHead {
}
}
func
NewBigFile
(
head
*
BigFileHead
)
*
BigFile
{
func
NewBigFile
Data
(
head
*
BigFileHead
)
*
BigFileData
{
return
&
BigFile
{
Node
:
nodefs
.
NewDefaultNode
(),
parent
:
head
}
return
&
BigFile
Data
{
Node
:
nodefs
.
NewDefaultNode
(),
parent
:
head
}
}
}
...
@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod
...
@@ -463,7 +462,7 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nod
// Read implements reading from /bigfile/<bigfileX>/head/data.
// Read implements reading from /bigfile/<bigfileX>/head/data.
// XXX and from /bigfile/<bigfileX>/@<tidX>/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
.at
.topoid
.topoid
// XXX
// 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