mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix compilation
This commit is contained in:
parent
cb25d100b7
commit
4d06e18554
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue