posix: checkDiskFree() also checks free inodes. (#2086)

Previously checkDiskFree() checks for free available space.  This
patch enables checkDiskFree() also checks for free inodes in linux and
free clusters in windows.

Fixes #2075
This commit is contained in:
Bala FA
2016-07-04 11:04:45 +05:30
committed by Harshavardhana
parent 52b55afce0
commit 1ad5fb8f76
5 changed files with 37 additions and 2 deletions

View File

@@ -32,6 +32,8 @@ func GetInfo(path string) (info Info, err error) {
info = Info{}
info.Total = int64(s.Bsize) * int64(s.Blocks)
info.Free = int64(s.Bsize) * int64(s.Bfree)
info.Files = int64(s.Files)
info.Ffree = int64(s.Ffree)
info.FSType, err = getFSType(path)
if err != nil {
return Info{}, err