Commit c558ef96 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 348c4fd4
......@@ -185,20 +185,26 @@ def _pinner(wconn, ctx):
return # XXX ok? (EOF - when wcfs closes wlink)
# we received request to pin/unpin file block. perform it
trace('lock _filemu ...')
with wconn._filemu:
trace('_filemu locked')
f = wconn._filetab.get(req.foid)
if f is None:
1/0 # XXX we are not watching the file - why wcfs sent us this update?
trace(f)
# XXX relock wconn -> f ?
for mmap in f.mmaps: # XXX use ↑blk_start for binary search
trace('\t%s' % mmap)
if not (mmap.blk_start <= req.blk < mmap.blk_stop):
continue # blk ∉ mmap
trace('\tremmapblk %d @%s' % (req.blk, h(req.at)))
# FIXME check if virtmem did not mapped RW page into this block already
mmap._remmapblk(req.blk, req.at)
trace('\t-> remmaped')
# update f.pinned
if req.at is None:
......
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