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
1afe0292
Commit
1afe0292
authored
Dec 21, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
947e04cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
wcfs/wcfs.go
wcfs/wcfs.go
+6
-4
No files found.
wcfs/wcfs.go
View file @
1afe0292
...
...
@@ -617,7 +617,8 @@ func (r *Root) zhandle1(zevent zodb.WatchEvent) {
r
.
zheadMu
.
Lock
()
defer
r
.
zheadMu
.
Unlock
()
toinvalidate
:=
map
[
*
ZBigFile
]
SetI64
{}
// {} zfile -> set(#blk)
//toinvalidate := map[*ZBigFile]SetI64{} // {} zfile -> set(#blk)
toinvalidate
:=
map
[
*
BigFileData
]
SetI64
{}
// {} zfile -> set(#blk)
// zevent = (tid^, []oid)
for
_
,
oid
:=
range
zevent
.
Changev
{
...
...
@@ -656,9 +657,10 @@ func (r *Root) zhandle1(zevent zodb.WatchEvent) {
}
//wg = ...
ctx
:=
context
.
TODO
()
for
file
,
blkmap
:=
range
toinvalidate
{
for
blk
:=
range
blkmap
{
go
file
.
invalidateBlk
(
blk
)
// XXX -> wg.Go
go
file
.
invalidateBlk
(
ctx
,
blk
)
// XXX -> wg.Go
}
}
...
...
@@ -667,7 +669,7 @@ func (r *Root) zhandle1(zevent zodb.WatchEvent) {
// invalidateBlk invalidates 1 file block. XXX
// XXX see "4.4) for all file/blk to in invalidate we do"
func
(
f
*
file
)
invalidateBlk
(
ctx
context
.
Context
,
blk
int64
)
error
{
func
(
f
*
BigFileData
)
invalidateBlk
(
ctx
context
.
Context
,
blk
int64
)
error
{
fsconn
:=
f
.
root
()
.
fsconn
off
:=
blk
*
blksize
...
...
@@ -683,7 +685,7 @@ func (f *file) invalidateBlk(ctx context.Context, blk int64) error {
if
len
(
blkdata
)
==
blksize
{
// XXX -> go
// store retrieved data back to OS cache for file @<rev>/data[blk]
frev
,
_
:=
file
.
δFtail
.
LastRevOf
(
blk
,
at
)
frev
,
_
:=
f
.
bigf
ile
.
δFtail
.
LastRevOf
(
blk
,
at
)
st
=
fsconn
.
FileNotifyStoreCache
(
frev
.
Inode
(),
off
,
blkdata
)
if
st
!=
fuse
.
OK
{
// XXX log - dup wrt readBlk -> common func.
...
...
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