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
78907280
Commit
78907280
authored
Mar 20, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
75953935
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
wcfs/wcfs.go
wcfs/wcfs.go
+32
-9
No files found.
wcfs/wcfs.go
View file @
78907280
...
...
@@ -472,16 +472,17 @@ type Head struct {
// XXX move zconn's current transaction to Head here?
// XXX move watchTab here?
// head/watch opens
// XXX protected by ... head.zconnMu ?
// XXX -> Head ?
watchTab
map
[
*
Watcher
]
struct
{}
}
// /head/watch - served by Watch.
type
Watch
struct
{
fsNode
// head/watch opens
// XXX protected by ... head.zconnMu ?
watchTab
map
[
*
Watcher
]
struct
{}
head
*
Head
// parent head/
}
// /head/watch handle - served by Watcher.
...
...
@@ -1231,6 +1232,27 @@ retry:
}
// ---- Watch server ----
// Open serves /head/watch opens.
func
(
watch
*
Watch
)
Open
(
flags
uint32
,
fctx
*
fuse
.
Context
)
(
nodefs
.
File
,
fuse
.
Status
)
{
// XXX check flags?
w
:=
&
Watcher
{
sk
:
NewFileSock
(),
fileTab
:
make
(
map
[
*
FileWatch
]
struct
{}),
}
// XXX locking
watch
.
head
.
watchTab
[
w
]
=
struct
{}{}
go
w
.
serve
()
return
w
.
sk
.
File
(),
fuse
.
OK
}
// serve serves client originated watch requests.
func
(
w
*
Watcher
)
serve
()
{
//w.recvReq()
}
// ---- Lookup ----
...
...
@@ -1604,14 +1626,15 @@ func main() {
// mount root + head/
// XXX -> newHead()
head
:=
&
Head
{
fsNode
:
newFSNode
(
fSticky
),
rev
:
0
,
zconn
:
zhead
,
fsNode
:
newFSNode
(
fSticky
),
rev
:
0
,
zconn
:
zhead
,
watchTab
:
make
(
map
[
*
Watcher
]
struct
{}),
}
watch
:=
&
Watch
{
fsNode
:
newFSNode
(
fSticky
),
watchTab
:
make
(
map
[
*
Watcher
]
struct
{})
,
fsNode
:
newFSNode
(
fSticky
),
head
:
head
,
}
bfdir
:=
&
BigFileDir
{
...
...
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