Commit 37a1acb4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d8138920
......@@ -190,6 +190,23 @@ def _pinner(wconn, ctx):
return # XXX ok? (EOF - when wcfs closes wlink)
# we received request to pin/unpin file block. perform it
wconn._pin1(req)
# pin1 handles one pin request received from wcfs
@func(Conn)
def _pin1(wconn, req):
# reply either ack or nak on error
def _():
ack = "ack"
exc = sys.exc_info()[1]
if exc is not None:
ack = "nak: %s" % exc
req.reply(ack)
defer(_)
def trace(msg):
print('pin1: %s' % msg)
trace('lock _filemu ...')
with wconn._filemu:
trace('_filemu locked')
......
......@@ -1760,7 +1760,7 @@ def test_wcfspy_virtmem():
assert f.pinned == {2:at1}
tm1.assertBlk(3, 'd1')
assert f.pinned == {2:at1}
tm1.assertBlk(3, 'x')
tm1.assertBlk(4, 'x')
assert f.pinned == {2:at1}
#assertData (m1, ['c1','d1',''])
......
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