Commit ac7488d3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9b97e435
...@@ -1106,7 +1106,9 @@ func (f *BigFile) readBlk(ctx context.Context, blk int64, dest []byte) (err erro ...@@ -1106,7 +1106,9 @@ func (f *BigFile) readBlk(ctx context.Context, blk int64, dest []byte) (err erro
// updateWatchers complements readBlk and update watchers of the file after a // updateWatchers complements readBlk and update watchers of the file after a
// block was loaded from ZODB and before block data is returned to kernel. // block was loaded from ZODB and before block data is returned to kernel.
// //
// see "7.2) for all registered client@at watchers ..." // See "7.2) for all registered client@at watchers ..."
//
// Called with f.head.zconnMu rlocked.
func (f *BigFile) updateWatchers(blk int64, treepath []zodb.IPersistent, pathRevMax zodb.Tid) { func (f *BigFile) updateWatchers(blk int64, treepath []zodb.IPersistent, pathRevMax zodb.Tid) {
// only head/ is being watched for // only head/ is being watched for
if f.head.rev != 0 { if f.head.rev != 0 {
...@@ -1122,9 +1124,10 @@ func (f *BigFile) updateWatchers(blk int64, treepath []zodb.IPersistent, pathRev ...@@ -1122,9 +1124,10 @@ func (f *BigFile) updateWatchers(blk int64, treepath []zodb.IPersistent, pathRev
blkrevmax, _ := f.δFtail.LastRevOf(blk, f.zfile.PJar().At()) // XXX = f.head.zconn.At() blkrevmax, _ := f.δFtail.LastRevOf(blk, f.zfile.PJar().At()) // XXX = f.head.zconn.At()
blkrevmax = tidmin(blkrevmax, pathRevMax) blkrevmax = tidmin(blkrevmax, pathRevMax)
for w := range f.watchers {
_ = w
}
/* /*
// XXX remmapping - only if head.rev == 0
// XXX -> own func?
// XXX locking // XXX locking
for _, mapping := range f.mappings { for _, mapping := range f.mappings {
if revmax <= mapping.at || !mapping.blkrange.in(blk) { if revmax <= mapping.at || !mapping.blkrange.in(blk) {
......
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