Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ func (f *File) WriteAt(b []byte, off int64) (n int, err error) {
if frontlen > toWrite {
frontlen = toWrite
}
wrote, err := f.writeToBlock(blkIndex, int(blkOff), int(blkOff)+frontlen, b[:frontlen])
clog.Tracef("head writing block at index %d, inoderef %s", blkIndex, f.writeINodeRef)
wrote, err := f.writeToBlock(blkIndex, int(blkOff), int(blkOff)+frontlen, b[:frontlen])
if err != nil {
return n, err
} else if wrote != frontlen {
Expand Down Expand Up @@ -232,10 +232,10 @@ func (f *File) WriteAt(b []byte, off int64) (n int, err error) {
panic("Offset not equal to a block boundary after bulk")
}
blkIndex = int(off / f.blkSize)
wrote, err := f.writeToBlock(blkIndex, 0, toWrite, b)
if clog.LevelAt(capnslog.TRACE) {
clog.Tracef("tail writing block at index %d, inoderef %s", blkIndex, f.writeINodeRef)
}
wrote, err := f.writeToBlock(blkIndex, 0, toWrite, b)
if err != nil {
promFileWrittenBytes.WithLabelValues(f.volume.Name).Add(float64(n))
return n, err
Expand Down