Commit d3ea9734 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b6e23e54
......@@ -63,7 +63,7 @@ func NewPathSet() *PathSet {
//
// XXX catch cycles on add?
func (m *PathSet) Add(master interface{}, path []zodb.IPersistent) {
fmt.Printf("\n\nPathSet.Add %v %s\n", master, path)
//fmt.Printf("\n\nPathSet.Add %v %s\n", master, path)
l := len(path)
if l == 0 {
......
......@@ -698,16 +698,39 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
return file.invalidateBlk(ctx, blk)
})
}
}
err := wg.Wait()
if err != nil {
panic(err) // XXX
}
// invalidate kernel cache for attributes
// we need to do it only if we see topoligy (i.e. btree) change
if finv.size {
//
// do it after completing data invalidations, else the kernel might get
// 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 {
panic(err) // XXX
}
......
......@@ -510,12 +510,12 @@ func (bf *ZBigFile) Size(ctx context.Context) (_ int64, treePath []zodb.IPersist
}
defer bf.PDeactivate()
fmt.Printf("\n\n\nSize ...\n")
//fmt.Printf("\n\n\nSize ...\n")
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)
})
fmt.Printf("end Size (%v)\n", treePath)
//fmt.Printf("end Size (%v)\n", treePath)
if err != nil{
return 0, nil, err
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment