Commit b77b21f6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 27e25ab5
......@@ -522,7 +522,8 @@ func (bfdata *BigFileData) Read(_ nodefs.File, dest []byte, off int64, fctx *fus
blkoff := blkoff
blk := blkoff / zbf.blksize
wg.Go(func() error {
return bfdata.readBlk(ctx, blk, dest[blkoff-aoff:]) // XXX dest.size
δ := blkoff-aoff // blk position in dest
return bfdata.readBlk(ctx, blk, dest[δ:δ+zbf.blksize])
})
}
......@@ -536,6 +537,8 @@ func (bfdata *BigFileData) Read(_ nodefs.File, dest []byte, off int64, fctx *fus
}
// readBlk serves Read to read 1 ZBlk #blk into destination buffer.
//
// len(dest) == blksize.
func (bfdata *BigFileData) readBlk(ctx context.Context, blk int64, dest []byte) error {
// XXX errctx?
......
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