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
af8daaed
Commit
af8daaed
authored
Jul 05, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
21691ac6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wcfs/wcfs.go
wcfs/wcfs.go
+7
-7
No files found.
wcfs/wcfs.go
View file @
af8daaed
...
@@ -895,10 +895,10 @@ retry:
...
@@ -895,10 +895,10 @@ retry:
// XXX for f in δF: f.δtail.ForgetPast(...)
// XXX for f in δF: f.δtail.ForgetPast(...)
// notify zhead.At waiters
// notify zhead.At waiters
for
w
:=
range
head
.
hwait
{
for
h
w
:=
range
head
.
hwait
{
if
w
.
at
<=
δZ
.
Tid
{
if
h
w
.
at
<=
δZ
.
Tid
{
delete
(
head
.
hwait
,
w
)
delete
(
head
.
hwait
,
h
w
)
close
(
w
.
ready
)
close
(
h
w
.
ready
)
}
}
}
}
...
@@ -1384,7 +1384,7 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
...
@@ -1384,7 +1384,7 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
}
}
// readPinWatchers complements readBlk: it sends `pin blk` for watchers of the file
// readPinWatchers complements readBlk: it sends `pin blk` for watchers of the file
// after a block was loaded from ZODB
and
before block data is returned to kernel.
// after a block was loaded from ZODB
but
before block data is returned to kernel.
//
//
// See "7.2) for all registered client@at watchers ..."
// See "7.2) for all registered client@at watchers ..."
//
//
...
@@ -1407,7 +1407,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
...
@@ -1407,7 +1407,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
bfdir
.
δFtail
.
Track
(
f
,
blk
,
treepath
,
zblk
)
// XXX pass in zblk.rev here?
bfdir
.
δFtail
.
Track
(
f
,
blk
,
treepath
,
zblk
)
// XXX pass in zblk.rev here?
bfdir
.
δFmu
.
Unlock
()
bfdir
.
δFmu
.
Unlock
()
// make
s
sure that file[blk] on clients side stays as of @w.at state.
// make sure that file[blk] on clients side stays as of @w.at state.
// try to use blkrevMax only as the first cheap criteria to skip updating watchers.
// try to use blkrevMax only as the first cheap criteria to skip updating watchers.
// This is likely to be the case, since most watchers should be usually close to head.
// This is likely to be the case, since most watchers should be usually close to head.
...
@@ -1534,7 +1534,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
...
@@ -1534,7 +1534,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// request exclusive access to the watch to change .at and compute pins.
// request exclusive access to the watch to change .at and compute pins.
// The lock will be downgraded from W to R after pins computation is done.
// The lock will be downgraded from W to R after pins computation is done.
// Pins will be executed with atMu.R only - with the idea not to block
// Pins will be executed with atMu.R only - with the idea not to block
// other client that read-access the file simultaneously to setupWatch.
// other client
s
that read-access the file simultaneously to setupWatch.
w
.
atMu
.
Lock
()
w
.
atMu
.
Lock
()
// check at >= w.at
// check at >= w.at
...
...
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