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
d9ad8e1d
Commit
d9ad8e1d
authored
Jan 13, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3acc5bbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
8 deletions
+15
-8
wcfs/misc.go
wcfs/misc.go
+2
-0
wcfs/todo.dot
wcfs/todo.dot
+2
-2
wcfs/todo.svg
wcfs/todo.svg
+2
-2
wcfs/wcfs.go
wcfs/wcfs.go
+4
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+5
-1
No files found.
wcfs/misc.go
View file @
d9ad8e1d
...
...
@@ -100,6 +100,8 @@ func asctx(fctx *fuse.Context) context.Context {
}
// defaultNode should be used instead of nodefs.DefaultNode in wcfs.
//
// nodefs.DefaultNode.Open returns ENOSYS. This is convenient for filesystems
// that have no dynamic files at all. But for filesystems, where there are some
// dynamic files - i.e. nodes which do need to support Open, returning ENOSYS
...
...
wcfs/todo.dot
View file @
d9ad8e1d
...
...
@@ -80,7 +80,7 @@ digraph {
fuseRetrieveCache
[
label
=
"FUSE:\nretrieve cache"
,
style
=
filled
fillcolor
=
lightyellow
]
_
wcfs_zhead
[
label
=
".wcfs/\nzhead"
]
_
wcfs_zhead
[
label
=
".wcfs/\nzhead"
,
style
=
filled
fillcolor
=
grey95
]
wcfsRead
[
label
=
"read(#blk)"
]
...
...
@@ -90,7 +90,7 @@ digraph {
mappingRegister
[
label
=
"mmappings:\nregister/maint"
]
clientInvHandle
[
label
=
"process\n#blk invalidations"
]
headWatch
[
label
=
"#blk ← head/watch"
]
fileSock
[
label
=
"FileSock"
]
fileSock
[
label
=
"FileSock"
,
style
=
filled
fillcolor
=
grey95
]
ZODB_go_inv
[
label
=
"ZODB/go\ninvalidations"
,
style
=
filled
fillcolor
=
grey95
]
fs1_go_inv
[
label
=
"fs1/go\ninvalidations"
,
style
=
filled
fillcolor
=
grey95
]
...
...
wcfs/todo.svg
View file @
d9ad8e1d
...
...
@@ -201,7 +201,7 @@
<!-- _wcfs_zhead -->
<g
id=
"node13"
class=
"node"
>
<title>
_wcfs_zhead
</title>
<ellipse
fill=
"
none
"
stroke=
"#000000"
cx=
"857.2046"
cy=
"-209.8234"
rx=
"35.2113"
ry=
"26.7407"
/>
<ellipse
fill=
"
#f2f2f2
"
stroke=
"#000000"
cx=
"857.2046"
cy=
"-209.8234"
rx=
"35.2113"
ry=
"26.7407"
/>
<text
text-anchor=
"middle"
x=
"857.2046"
y=
"-213.6234"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
.wcfs/
</text>
<text
text-anchor=
"middle"
x=
"857.2046"
y=
"-198.6234"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
zhead
</text>
</g>
...
...
@@ -331,7 +331,7 @@
<!-- fileSock -->
<g
id=
"node26"
class=
"node"
>
<title>
fileSock
</title>
<ellipse
fill=
"
none
"
stroke=
"#000000"
cx=
"1088.2046"
cy=
"-109.4767"
rx=
"42.4939"
ry=
"18"
/>
<ellipse
fill=
"
#f2f2f2
"
stroke=
"#000000"
cx=
"1088.2046"
cy=
"-109.4767"
rx=
"42.4939"
ry=
"18"
/>
<text
text-anchor=
"middle"
x=
"1088.2046"
y=
"-105.7767"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
FileSock
</text>
</g>
<!-- _wcfs_zhead->fileSock -->
...
...
wcfs/wcfs.go
View file @
d9ad8e1d
...
...
@@ -639,7 +639,8 @@ func (root *Root) zhandle1(zevent zodb.CommitEvent) {
}
}
// XXX resync .zhead to zevent.tid
// resync .zhead to zevent.tid
zhead
.
Resync
(
zevent
.
Tid
)
// notify .wcfs/zhead
for
sk
:=
range
gdebug
.
zheadSockTab
{
...
...
@@ -753,7 +754,7 @@ func (bfdir *BigFileDir) Lookup(out *fuse.Attr, name string, fctx *fuse.Context)
}
func
(
bfdir
*
BigFileDir
)
lookup
(
out
*
fuse
.
Attr
,
name
string
,
fctx
*
fuse
.
Context
)
(
f
*
BigFile
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"/
bigfile: lookup %q"
,
name
)
defer
xerr
.
Contextf
(
&
err
,
"/
XXXbigfile: lookup %q"
,
name
)
// XXX name -> path
oid
,
err
:=
zodb
.
ParseOid
(
name
)
if
err
!=
nil
{
...
...
@@ -1297,7 +1298,7 @@ func main() {
// If a user opens it, it will start to get tids of through which
// zhead.at was, starting from the time when .wcfs/zhead was opened.
// There can be multiple openers. Once opened, the file must be read,
// as wcfs blocks waiting for data to be read.
// as wcfs blocks waiting for data to be read
before XXX
.
mkfile
(
_wcfs
,
"zhead"
,
&
_wcfs_Zhead
{
Node
:
newDefaultNode
(),
})
...
...
wcfs/wcfs_test.py
View file @
d9ad8e1d
...
...
@@ -198,7 +198,6 @@ def test_wcfs():
assert
tidtime
(
tid2
)
>
tidtime
(
tid1
)
wcsync
()
return
# path to head/ and head/bigfile/ under wcfs
head
=
wc
.
mountpoint
+
"/head"
...
...
@@ -209,9 +208,12 @@ def test_wcfs():
os
.
stat
(
"%s/%s"
%
(
bigpath
,
h
(
last
.
_p_oid
)))
assert
exc
.
value
.
errno
==
EINVAL
return
# path to f under wcfs
fpath
=
"%s/%s"
%
(
bigpath
,
h
(
f
.
_p_oid
))
print
print
fpath
st
=
os
.
stat
(
fpath
)
assert
st
.
st_size
==
0
...
...
@@ -220,6 +222,8 @@ def test_wcfs():
# head/at = last txn of whole db
assert
readfile
(
head
+
"/at"
)
==
h
(
tid2
)
return
# TODO check head/at syncs to later non-bigfile commits
...
...
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