Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
37a1acb4
Commit
37a1acb4
authored
Jul 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d8138920
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
27 deletions
+44
-27
wcfs/__init__.py
wcfs/__init__.py
+43
-26
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-1
No files found.
wcfs/__init__.py
View file @
37a1acb4
...
...
@@ -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'
)
...
...
wcfs/wcfs_test.py
View file @
37a1acb4
...
...
@@ -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',''])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment