Commit a73d5f2b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 69181fdb
......@@ -605,6 +605,7 @@ type WatchLink struct {
// was queried also send pins.
//
// XXX locking?
// XXX -> watchByFile?
byfile map[zodb.Oid]*Watch // {} foid -> Watch
// IO
......@@ -822,7 +823,7 @@ retry:
}
file := file
wg.Go(func() error {
return file.invalidateAttr() // XXX pass ctx?
return file.invalidateAttr() // NOTE does not accept ctx
})
}
err = wg.Wait()
......@@ -928,8 +929,7 @@ func (head *Head) zheadWait(ctx context.Context, at zodb.Tid) (err error) {
// invalidateBlk invalidates 1 file block in kernel cache.
//
// see "4.4) for all file/blk to in invalidate we do"
//
// called with f.head.zheadMu wlocked.
// called with zheadMu wlocked.
func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) (err error) {
defer xerr.Contextf(&err, "%s: invalidate blk #%d:", f.path(), blk)
......@@ -951,7 +951,7 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) (err error) {
delete(f.loading, blk)
}
// XXX skip retrieve/store if len(f.watches) == 0
// TODO skip retrieve/store if len(f.watches) == 0
// try to retrieve cache of current head/data[blk], if we got nothing from f.loading
if blkdata == nil {
blkdata = make([]byte, blksize)
......@@ -996,7 +996,8 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) (err error) {
// invalidateAttr invalidates file attributes in kernel cache.
//
// Complements invalidateBlk and is used to invalidate file size.
// complements invalidateBlk and is used to invalidate file size.
// called with zheadMu wlocked.
func (f *BigFile) invalidateAttr() (err error) {
defer xerr.Contextf(&err, "%s: invalidate attr", f.path())
fsconn := gfsconn
......
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