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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
facc6db8
Commit
facc6db8
authored
Jul 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d0a22768
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
wcfs/wcfs.go
wcfs/wcfs.go
+10
-8
No files found.
wcfs/wcfs.go
View file @
facc6db8
...
...
@@ -270,7 +270,7 @@ package main
//
// invalidation message: (tid↑, []oid)
//
// 4.1) zhead.cache.lookup(oid)
// 4.1) zhead.cache.lookup(oid)
XXX -> δFtail
// 4.2) ø: nothing to do - see invariant ^^^.
// 4.3) obj found:
//
...
...
@@ -525,7 +525,7 @@ type BigFileDir struct {
// δ tail of tracked BTree nodes of all BigFiles + -> which file
// (used only for head/, not revX/)
δFmu
sync
.
RWMutex
//
XXX zheadMu.W | zheadMu.R + δFmu.X ?
δFmu
sync
.
RWMutex
//
zheadMu.W | zheadMu.R + δFmu.X
δFtail
*
ΔFtail
}
...
...
@@ -541,7 +541,7 @@ type BigFile struct {
zfile
*
ZBigFile
// things read/computed from .zfile; constant during lifetime of current transaction.
//
XXX
i.e. changed under zhead.W
// i.e. changed under zhead.W
blksize
int64
// zfile.blksize
size
int64
// zfile.Size()
rev
zodb
.
Tid
// last revision that modified zfile data
...
...
@@ -767,13 +767,13 @@ retry:
close
(
continueOSCacheUpload
)
}()
// head.zheadMu locked and all cache uploaders are paused
// head.zheadMu
w
locked and all cache uploaders are paused
zhead
:=
head
.
zconn
bfdir
:=
head
.
bfdir
// invalidate kernel cache for data in changed files
//
XXX no δFmu lock needed because head is
Locked
//
NOTE no δFmu lock needed because zhead is W
Locked
δF
:=
bfdir
.
δFtail
.
Update
(
δZ
,
zhead
)
if
false
{
...
...
@@ -843,8 +843,8 @@ retry:
zhead
.
txnCtx
=
ctx
// 2. restat invalidated ZBigFile
// NOTE no lock needed since .blksize and .size are constant during lifetime of one txn.
// XXX -> parallel
// XXX locking
for
file
:=
range
δF
.
ByFile
{
size
,
sizePath
,
err
:=
file
.
zfile
.
Size
(
ctx
)
if
err
!=
nil
{
...
...
@@ -854,6 +854,8 @@ retry:
file
.
size
=
size
bfdir
.
δFtail
.
Track
(
file
,
-
1
,
sizePath
,
nil
)
// XXX we can miss a change to file if δblk is not yet tracked
// -> need to update file.rev at read time -> locking=XXX
file
.
rev
=
zhead
.
At
()
}
...
...
@@ -861,7 +863,7 @@ retry:
for
sk
:=
range
gdebug
.
zheadSockTab
{
_
,
err
:=
fmt
.
Fprintf
(
sk
,
"%s
\n
"
,
δZ
.
Tid
)
if
err
!=
nil
{
log
.
Error
(
err
)
// XXX errctx, -> warning?
log
.
Error
f
(
"%s"
,
err
)
// XXX errctx + file, handle, reader pid
sk
.
Close
()
delete
(
gdebug
.
zheadSockTab
,
sk
)
}
...
...
@@ -2065,7 +2067,7 @@ var gfsconn *nodefs.FileSystemConnector
// so we still have to reference the root via path.
var
gmntpt
string
// debugging
// debugging
(protected by zhead.W)
var
gdebug
=
struct
{
// .wcfs/zhead opens
// protected by groot.head.zheadMu
...
...
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