lib/{fs,filestream}: small consistency-related updates after cc90a548b1

This commit is contained in:
Aliaksandr Valialkin 2020-09-29 00:42:43 +03:00
parent cc90a548b1
commit 7673839228
2 changed files with 1 additions and 2 deletions

View File

@ -20,8 +20,8 @@ func (st *streamTracker) adviseDontNeed(n int, fdatasync bool) error {
return fmt.Errorf("unix.Fsync error: %w", err)
}
}
st.offset += blockSize
st.length -= blockSize
return nil
}

View File

@ -338,6 +338,5 @@ func mustGetFreeSpace(path string) uint64 {
if err := unix.Fstatfs(int(fd), &stat); err != nil {
logger.Panicf("FATAL: cannot determine free disk space on %q: %s", path, err)
}
return freeSpace(stat)
}