You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
443 B
21 lines
443 B
package page_writer
|
|
|
|
import "github.com/chrislusf/seaweedfs/weed/glog"
|
|
|
|
func CheckByteZero(message string, p []byte, start, stop int64) {
|
|
isAllZero := true
|
|
for i := start; i < stop; i++ {
|
|
if p[i] != 0 {
|
|
isAllZero = false
|
|
break
|
|
}
|
|
}
|
|
if isAllZero {
|
|
if start != stop {
|
|
glog.Errorf("%s is all zeros [%d,%d)", message, start, stop)
|
|
}
|
|
} else {
|
|
glog.V(4).Infof("%s read some non-zero data [%d,%d)", message, start, stop)
|
|
}
|
|
|
|
}
|