fix compilation

This commit is contained in:
chrislu 2022-01-15 14:51:15 -08:00
parent cb25d100b7
commit 4d06e18554
4 changed files with 4 additions and 4 deletions

View file

@ -84,7 +84,7 @@ func (pw *PageWriter) ReadDirtyDataAt(data []byte, offset int64) (maxStop int64)
data = data[readSize:]
}
checkByteZero("page writer read", p, 0, maxStop-offset)
page_writer.CheckByteZero("page writer read", data, 0, maxStop-offset)
return
}

View file

@ -73,7 +73,7 @@ func (cw *ChunkedFileWriter) ReadDataAt(p []byte, off int64) (maxStop int64) {
glog.Errorf("reading temp file: %v", err)
break
}
checkByteZero("temp file writer read", p, logicStart-off, logicStop-off)
CheckByteZero("temp file writer read", p, logicStart-off, logicStop-off)
maxStop = max(maxStop, logicStop)
}
}

View file

@ -81,7 +81,7 @@ func (cw *ChunkedStreamWriter) ReadDataAt(p []byte, off int64) (maxStop int64) {
copy(p[logicStart-off:logicStop-off], memChunk.buf[logicStart-memChunkBaseOffset:logicStop-memChunkBaseOffset])
maxStop = max(maxStop, logicStop)
checkByteZero("stream writer read", p, logicStart-off, logicStop-off)
CheckByteZero("stream writer read", p, logicStart-off, logicStop-off)
}
}

View file

@ -2,7 +2,7 @@ package page_writer
import "github.com/chrislusf/seaweedfs/weed/glog"
func checkByteZero(message string, p []byte, start, stop int64) {
func CheckByteZero(message string, p []byte, start, stop int64) {
isAllZero := true
for i := start; i < stop; i++ {
if p[i] != 0 {