mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/{fs,filestream}: small consistency-related updates after cc90a548b1
This commit is contained in:
parent
cc90a548b1
commit
7673839228
2 changed files with 1 additions and 2 deletions
|
@ -20,8 +20,8 @@ func (st *streamTracker) adviseDontNeed(n int, fdatasync bool) error {
|
||||||
return fmt.Errorf("unix.Fsync error: %w", err)
|
return fmt.Errorf("unix.Fsync error: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
st.offset += blockSize
|
||||||
st.length -= blockSize
|
st.length -= blockSize
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,5 @@ func mustGetFreeSpace(path string) uint64 {
|
||||||
if err := unix.Fstatfs(int(fd), &stat); err != nil {
|
if err := unix.Fstatfs(int(fd), &stat); err != nil {
|
||||||
logger.Panicf("FATAL: cannot determine free disk space on %q: %s", path, err)
|
logger.Panicf("FATAL: cannot determine free disk space on %q: %s", path, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return freeSpace(stat)
|
return freeSpace(stat)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue