|
|
@ -141,7 +141,7 @@ func (c *ChunkReadAt) doReadAt(p []byte, offset int64) (n int, err error) { |
|
|
|
if chunkStart >= chunkStop { |
|
|
|
continue |
|
|
|
} |
|
|
|
// glog.V(4).Infof("read [%d,%d), %d/%d chunk %s [%d,%d)", chunkStart, chunkStop, i, len(c.chunkViews), chunk.FileId, chunk.LogicOffset-chunk.Offset, chunk.LogicOffset-chunk.Offset+int64(chunk.Size))
|
|
|
|
glog.V(4).Infof("read [%d,%d), %d/%d chunk %s [%d,%d)", chunkStart, chunkStop, i, len(c.chunkViews), chunk.FileId, chunk.LogicOffset-chunk.Offset, chunk.LogicOffset-chunk.Offset+int64(chunk.Size)) |
|
|
|
var buffer []byte |
|
|
|
bufferOffset := chunkStart - chunk.LogicOffset + chunk.Offset |
|
|
|
bufferLength := chunkStop - chunkStart |
|
|
@ -156,7 +156,7 @@ func (c *ChunkReadAt) doReadAt(p []byte, offset int64) (n int, err error) { |
|
|
|
startOffset, remaining = startOffset+int64(copied), remaining-int64(copied) |
|
|
|
} |
|
|
|
|
|
|
|
// glog.V(4).Infof("doReadAt [%d,%d), n:%v, err:%v", offset, offset+int64(len(p)), n, err)
|
|
|
|
glog.V(4).Infof("doReadAt [%d,%d), n:%v, err:%v", offset, offset+int64(len(p)), n, err) |
|
|
|
|
|
|
|
if err == nil && remaining > 0 && c.fileSize > startOffset { |
|
|
|
delta := int(min(remaining, c.fileSize-startOffset)) |
|
|
|