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
f0afdaf7
Commit
f0afdaf7
authored
Jul 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
131662a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
wcfs/wcfs.go
wcfs/wcfs.go
+9
-4
No files found.
wcfs/wcfs.go
View file @
f0afdaf7
...
...
@@ -506,7 +506,7 @@ type Head struct {
inflightOSCacheUploads
int32
// head/watch opens
// XXX protected by ... zheadMu ?
wlinkMu
sync
.
Mutex
wlinkTab
map
[
*
WatchLink
]
struct
{}
// waiters for zhead.At to become ≥ their at.
...
...
@@ -1563,9 +1563,10 @@ func (wnode *WatchNode) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fus
rxTab
:
make
(
map
[
uint64
]
chan
string
),
}
// XXX locking
head
.
wlinkMu
.
Lock
()
// XXX del wlinkTab[w] on w.sk.File.Release
head
.
wlinkTab
[
wlink
]
=
struct
{}{}
head
.
wlinkMu
.
Unlock
()
go
wlink
.
serve
()
return
wlink
.
sk
.
File
(),
fuse
.
OK
...
...
@@ -1579,9 +1580,13 @@ func (wlink *WatchLink) serve() {
if
err
!=
nil
{
log
.
Error
(
err
)
}
// XXX locking
delete
(
wlink
.
head
.
wlinkTab
,
wlink
)
// XXX deactiwate all watches from wlink.byfile[*]
head
:=
wlink
.
head
head
.
wlinkMu
.
Lock
()
delete
(
head
.
wlinkTab
,
wlink
)
head
.
wlinkMu
.
Unlock
()
}
func
(
wlink
*
WatchLink
)
_serve
()
(
err
error
)
{
...
...
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