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
d3ea9734
Commit
d3ea9734
authored
Feb 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b6e23e54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
11 deletions
+34
-11
wcfs/internal/δbtree/δbtree.go
wcfs/internal/δbtree/δbtree.go
+1
-1
wcfs/wcfs.go
wcfs/wcfs.go
+30
-7
wcfs/zblk.go
wcfs/zblk.go
+3
-3
No files found.
wcfs/internal/δbtree/δbtree.go
View file @
d3ea9734
...
@@ -63,7 +63,7 @@ func NewPathSet() *PathSet {
...
@@ -63,7 +63,7 @@ func NewPathSet() *PathSet {
//
//
// XXX catch cycles on add?
// XXX catch cycles on add?
func
(
m
*
PathSet
)
Add
(
master
interface
{},
path
[]
zodb
.
IPersistent
)
{
func
(
m
*
PathSet
)
Add
(
master
interface
{},
path
[]
zodb
.
IPersistent
)
{
fmt
.
Printf
(
"
\n\n
PathSet.Add %v %s
\n
"
,
master
,
path
)
//
fmt.Printf("\n\nPathSet.Add %v %s\n", master, path)
l
:=
len
(
path
)
l
:=
len
(
path
)
if
l
==
0
{
if
l
==
0
{
...
...
wcfs/wcfs.go
View file @
d3ea9734
...
@@ -698,16 +698,39 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
...
@@ -698,16 +698,39 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
return
file
.
invalidateBlk
(
ctx
,
blk
)
return
file
.
invalidateBlk
(
ctx
,
blk
)
})
})
}
}
}
err
:=
wg
.
Wait
()
if
err
!=
nil
{
panic
(
err
)
// XXX
}
// invalidate kernel cache for attributes
// invalidate kernel cache for attributes
// we need to do it only if we see topoligy (i.e. btree) change
// we need to do it only if we see topoligy (i.e. btree) change
if
finv
.
size
{
//
wg
.
Go
(
func
()
error
{
// do it after completing data invalidations, else the kernel might get
return
file
.
invalidateAttr
()
// stuck while we try to retrieve cache in invalidateBlk.
})
//
// XXX recheck ^^^ - we were stuck this way:
// wcfs: 19:42:23.335790 tx 0: NOTIFY_INVAL_INODE, {i8 [-1 +-1)}
// wcfs: 19:42:23.335800 Response: INODE_NOTIFY OK
// wcfs: 19:42:23.335817 tx 0: NOTIFY_RETRIEVE_CACHE, {> 0: i8 [2097152 +2097152)}
// wcfs: 19:42:23.335866 Response: NOTIFY_RETRIEVE_CACHE: OK
// ---- stuck here without kernel response ----
// wcfs: 19:42:28.588168 rx 58: INTERRUPT i0
// wcfs: 19:42:28.588232 Unimplemented opcode INTERRUPT
// wcfs: 19:42:28.588288 tx 58: 38=function not implemented
//
// XXX invalidateBlk gets stuck even without invalidateAttr.
wg
,
ctx
=
errgroup
.
WithContext
(
context
.
TODO
())
for
file
,
finv
:=
range
toinvalidate
{
if
!
finv
.
size
{
continue
}
}
wg
.
Go
(
func
()
error
{
return
file
.
invalidateAttr
()
})
}
}
err
:
=
wg
.
Wait
()
err
=
wg
.
Wait
()
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
err
)
// XXX
panic
(
err
)
// XXX
}
}
...
...
wcfs/zblk.go
View file @
d3ea9734
...
@@ -510,12 +510,12 @@ func (bf *ZBigFile) Size(ctx context.Context) (_ int64, treePath []zodb.IPersist
...
@@ -510,12 +510,12 @@ func (bf *ZBigFile) Size(ctx context.Context) (_ int64, treePath []zodb.IPersist
}
}
defer
bf
.
PDeactivate
()
defer
bf
.
PDeactivate
()
fmt
.
Printf
(
"
\n\n\n
Size ...
\n
"
)
//
fmt.Printf("\n\n\nSize ...\n")
tailblk
,
ok
,
err
:=
bf
.
blktab
.
VMaxKey
(
ctx
,
func
(
node
zodb
.
IPersistent
)
{
tailblk
,
ok
,
err
:=
bf
.
blktab
.
VMaxKey
(
ctx
,
func
(
node
zodb
.
IPersistent
)
{
fmt
.
Printf
(
"visit %v
\n
"
,
node
)
//
fmt.Printf("visit %v\n", node)
treePath
=
append
(
treePath
,
node
)
treePath
=
append
(
treePath
,
node
)
})
})
fmt
.
Printf
(
"end Size (%v)
\n
"
,
treePath
)
//
fmt.Printf("end Size (%v)\n", treePath)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
nil
,
err
return
0
,
nil
,
err
}
}
...
...
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