Commit 8fd0a998 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7b2b13c7
......@@ -30,7 +30,7 @@ in the link above), but it turned out that in writeback mode the kernel indeed
does not invalidate data cache on file size change, but neither it allows the
filesystem to set the size due to external event (see https://git.kernel.org/linus/8373200b12
"fuse: Trust kernel i_size only"). This prevents us to use writeback workaround
as we cannot even update the file from being empty to having some data.
as we cannot even update the file from being empty to have some data.
-> we did the patch for FUSE to have proper flag for filesystem server to tell
the kernel it is fully responsible for invalidating pagecache. The patch will
......
......@@ -853,29 +853,29 @@ def test_wcfs():
f.assertData ([], mtime=at0)
# >>> (@at1) commit data -> we can see it on wcfs
t.change(zf, {2: b'alpha'})
t.change(zf, {2: b''})
at1 = t.commit()
f.assertCache([0,0,0]) # initially not cached
f.assertData ([b'',b'',b'alpha'], mtime=t.head)
f.assertData ([b'',b'',b''], mtime=t.head)
# >>> (@at2) commit again -> we can see both latest and snapshotted states
t.change(zf, {2: b'beta', 3: b'gamma'})
t.change(zf, {2: b'2γ', 3: b'2δ'})
at2 = t.commit()
# f @head
f.assertCache([1,1,0,0])
f.assertData ([b'',b'', b'beta', b'gamma'], mtime=t.head)
f.assertData ([b'',b'', b'2γ', b'2δ'], mtime=t.head)
# f @at1
f1 = t.open(zf, at=at1)
f1.assertCache([0,0,1])
f1.assertData ([b'',b'',b'alpha']) # XXX + mtime=at1?
f1.assertData ([b'',b'',b'']) # XXX + mtime=at1?
# >>> (@at3) commit again without changing zf size
f2 = t.open(zf, at=at2)
t.change(zf, {2: b'kitty'})
t.change(zf, {2: b''})
at3 = t.commit()
f.assertCache([1,1,0,1])
......@@ -888,15 +888,15 @@ def test_wcfs():
# f @head
f.assertCache([1,1,0,1])
f.assertData ([b'',b'',b'kitty',b'gamma'], mtime=t.head)
f.assertData ([b'',b'',b'3γ',b'2δ'], mtime=t.head)
# f @at2
f2.assertCache([0,0,1,0])
f2.assertData ([b'',b'',b'beta',b'gamma']) # XXX mtime=at2
f2.assertData ([b'',b'',b'2γ',b'2δ']) # XXX mtime=at2
# f @at1
f1.assertCache([1,1,1])
f1.assertData ([b'',b'',b'alpha']) # XXX + mtime=at1?
f1.assertData ([b'',b'',b'']) # XXX + mtime=at1?
# >>> f close / open again -> cache must not be lost
......@@ -906,6 +906,7 @@ def test_wcfs():
f = t.open(zf)
assert f.cached() != [0,0,0,0]
return # XXX temp
# >>> XXX commit data to not yet accessed f part - nothing happens
......@@ -950,10 +951,26 @@ def test_wcfs():
print()
# watched + commit -> receive pin messages
wl = t.openwatch()
wl.watch(zf, t.head)
f.assertCache([1,1,1,1])
t.change(zf, {1: b'rio', 2: b'tty', 5: b'big'})
at4 = t.commit()
f.assertCache([1,0,0,1,0,0])
# XXX going not only up, but also down at1 <- at2 <- at3 ? -> forbid?
# XXX watched + commit -> receive pin messages
# XXX commit after current file size -> watch
# XXX access to block not previously accessed but invalidated in ZODB
# XXX going not only up, but also down at1 <- at2 <- at3 ? -> forbid?
# XXX 2 (or more) opened watch for 1 file at the same time
......@@ -966,8 +983,6 @@ def test_wcfs():
# XXX mmap f; change f[blk] on pin message while under pagefault - should get changed page
# XXX access to block not previously accessed but invalidated in ZODB
# XXX new watch request while previous watch request is in progress (over the same /head/watch handle)
# XXX blk not initially covered by f.δtail (blk never accessed - f.δtail
......
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