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
08f0e905
Commit
08f0e905
authored
Feb 04, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5115f254
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
wcfs/wcfs.go
wcfs/wcfs.go
+13
-2
No files found.
wcfs/wcfs.go
View file @
08f0e905
...
...
@@ -542,7 +542,7 @@ func traceWatch(format string, argv ...interface{}) {
return
}
log
.
Infof
(
"zwatcher: "
+
format
,
argv
...
)
log
.
Infof
(
"zwatcher: "
+
format
,
argv
...
)
// XXX InfoDepthf
}
// zwatcher watches for ZODB changes.
...
...
@@ -648,9 +648,16 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
runtime
.
KeepAlive
(
obj
)
}
fmt
.
Printf
(
"
\n\n
zδhandle: toinvalidate (#%d):
\n
"
,
len
(
toinvalidate
))
for
file
:=
range
toinvalidate
{
fmt
.
Printf
(
"
\t
- %s
\n
"
,
file
.
zbf
.
POid
())
}
wg
,
ctx
:=
errgroup
.
WithContext
(
context
.
TODO
())
for
file
,
blkmap
:=
range
toinvalidate
{
file
:=
file
for
blk
:=
range
blkmap
{
blk
:=
blk
wg
.
Go
(
func
()
error
{
return
file
.
invalidateBlk
(
ctx
,
blk
)
})
...
...
@@ -658,7 +665,9 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
// invalidate kernel cache for attributes
// XXX we need to do it only if we see topoligy (i.e. btree) change
wg
.
Go
(
file
.
invalidateAttr
)
wg
.
Go
(
func
()
error
{
return
file
.
invalidateAttr
()
})
}
err
:=
wg
.
Wait
()
if
err
!=
nil
{
...
...
@@ -753,6 +762,8 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) error {
// invalidateAttr invalidates file attributes in kernel cache.
func
(
f
*
BigFile
)
invalidateAttr
()
error
{
log
.
Error
(
"AAA"
)
fsconn
:=
gfsconn
st
:=
fsconn
.
FileNotify
(
f
.
Inode
(),
-
1
,
-
1
)
// metadata only
// st != ok
...
...
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