Commit d9ad8e1d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3acc5bbf
......@@ -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
......
......@@ -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]
......
......@@ -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&#45;&gt;fileSock -->
......
......@@ -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(),
})
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment