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
a5304b31
Commit
a5304b31
authored
May 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b459a4b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
wcfs/wcfs.go
wcfs/wcfs.go
+10
-7
No files found.
wcfs/wcfs.go
View file @
a5304b31
...
@@ -590,7 +590,7 @@ type WatchLink struct {
...
@@ -590,7 +590,7 @@ type WatchLink struct {
// was queried also send pins.
// was queried also send pins.
//
//
// XXX locking?
// XXX locking?
fileTab
map
[
zodb
.
Oid
]
*
Watch
// {} foid -> Watch
byfile
map
[
zodb
.
Oid
]
*
Watch
// {} foid -> Watch
// IO
// IO
reqNext
uint64
// stream ID for next wcfs-originated request
reqNext
uint64
// stream ID for next wcfs-originated request
...
@@ -1354,7 +1354,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1354,7 +1354,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// XXX at = zobd.InvalidTid - remove watch
// XXX at = zobd.InvalidTid - remove watch
// XXX if watch was already established - we need to update it
// XXX if watch was already established - we need to update it
w
:=
wlink
.
fileTab
[
foid
]
w
:=
wlink
.
byfile
[
foid
]
if
w
!=
nil
{
if
w
!=
nil
{
panic
(
"TODO"
)
// XXX update the watch
panic
(
"TODO"
)
// XXX update the watch
}
}
...
@@ -1419,6 +1419,9 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1419,6 +1419,9 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
return
err
return
err
}
}
// XXX locking
wlink
.
byfile
[
foid
]
=
w
return
nil
return
nil
}
}
...
@@ -1431,7 +1434,7 @@ func (wnode *WatchNode) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fus
...
@@ -1431,7 +1434,7 @@ func (wnode *WatchNode) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fus
sk
:
NewFileSock
(),
sk
:
NewFileSock
(),
id
:
atomic
.
AddInt32
(
&
wnode
.
idNext
,
+
1
),
id
:
atomic
.
AddInt32
(
&
wnode
.
idNext
,
+
1
),
head
:
head
,
head
:
head
,
fileTab
:
make
(
map
[
zodb
.
Oid
]
*
Watch
),
byfile
:
make
(
map
[
zodb
.
Oid
]
*
Watch
),
rxTab
:
make
(
map
[
uint64
]
chan
string
),
rxTab
:
make
(
map
[
uint64
]
chan
string
),
}
}
...
...
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