diff --git a/file.go b/file.go
index <HASH>..<HASH> 100644
--- a/file.go
+++ b/file.go
@@ -207,9 +207,9 @@ func newBufferedSectionWriter(w io.WriterAt, begPos, maxBytes int64,
 			if ok {
 				buf, pos = req.buf, req.pos
 				if len(buf) > 0 {
-					_, err = w.WriteAt(buf, pos)
+					nBytes, err := w.WriteAt(buf, pos)
 					if err == nil && s != nil {
-						s.reportBytesWritten(uint64(len(buf)))
+						s.reportBytesWritten(uint64(nBytes))
 					}
 				}
 			}
MB-<I> - Improving the compaction related stats

Switching from an ever-increasing compaction stats to a
compaction cycle specific stats by reseting the stats
after every compaction
Moving back to ever increasing stat and some clean up

Change-Id: Iea<I>e<I>e9bcc<I>a4f<I>fad<I>bbb<I>c<I>a
Reviewed-on: <URL>