Commit 56ee365c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2c3deaab
...@@ -1175,6 +1175,8 @@ func (f *BigFile) updateWatchers(ctx context.Context, blk int64, treepath []btre ...@@ -1175,6 +1175,8 @@ func (f *BigFile) updateWatchers(ctx context.Context, blk int64, treepath []btre
return return
} }
fmt.Printf("S: read -> update watchers (#%d)\n", len(f.watches))
// update δFtail index // update δFtail index
bfdir := f.head.bfdir bfdir := f.head.bfdir
bfdir.δFmu.Lock() // XXX locking correct? XXX -> better push down? bfdir.δFmu.Lock() // XXX locking correct? XXX -> better push down?
...@@ -1201,6 +1203,8 @@ func (f *BigFile) updateWatchers(ctx context.Context, blk int64, treepath []btre ...@@ -1201,6 +1203,8 @@ func (f *BigFile) updateWatchers(ctx context.Context, blk int64, treepath []btre
for w := range f.watches { for w := range f.watches {
w := w w := w
fmt.Printf("S: read -> update watchers: w @%s\n", w.at)
// XXX locking // XXX locking
// the block is already covered by @w.at database view // the block is already covered by @w.at database view
...@@ -2007,6 +2011,8 @@ func (zh *_wcfs_Zhead) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fuse ...@@ -2007,6 +2011,8 @@ func (zh *_wcfs_Zhead) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fuse
return sk.File(), fuse.OK return sk.File(), fuse.OK
} }
// TODO -> enable/disable fuse debugging dynamically (by write to .wcfs/debug ?)
func main() { func main() {
stdlog.SetPrefix("wcfs: ") stdlog.SetPrefix("wcfs: ")
//log.CopyStandardLogTo("WARNING") // XXX -> "DEBUG" if -d ? //log.CopyStandardLogTo("WARNING") // XXX -> "DEBUG" if -d ?
......
...@@ -917,6 +917,7 @@ def test_wcfs(): ...@@ -917,6 +917,7 @@ def test_wcfs():
# >>> XXX commit data to not yet accessed f part - nothing happens # >>> XXX commit data to not yet accessed f part - nothing happens
"""
# >>> invalidation protocol # >>> invalidation protocol
print('\n\n inv. protocol \n\n') print('\n\n inv. protocol \n\n')
...@@ -955,8 +956,9 @@ def test_wcfs(): ...@@ -955,8 +956,9 @@ def test_wcfs():
for at in revv[1:]: for at in revv[1:]:
wl.watch(zf, at) wl.watch(zf, at)
wl.close() wl.close()
"""
print() print('\n\n\n\nWATCH+COMMIT\n\n\n\n')
# watched + commit -> receive pin messages # watched + commit -> receive pin messages
wl = t.openwatch() wl = t.openwatch()
......
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