minio/pkg
Tamer Fahmy 0bf981278e Provide the correct free block size volume/disk information (#4943)
On *NIX platforms the statfs(2) system call returns a struct containing both the
free blocks in the filesystem (Statfs_t.Bfree) and the free blocks available to
the unprivileged or non-superuser (Statfs_t.Bavail).

The `Bfree` and `Bavail` fields (with `Bfree >= Bavail`) will be set to
different values on e.g. filesystems such as ext4 that reserve a certain
percentage of the filesystem blocks which may only be allocated by admnistrative
privileged processes.

The calculations for the `Total` disk space need to subtract the difference
between the `Bfree` and `Bavail` fields for it to correctly show the total
available storage space available for unprivileged users.

This implicitly fixes a bug where the `Used = Total - Free` calculation yielded
different (and also incorrect) results for identical contents stored when only
the sizes of the disks or backing volumes differed. (as can be witnessed in the
`Used:` value displayed in the Minio browser)

See:
- https://wiki.archlinux.org/index.php/ext4#Reserved_blocks
- http://man7.org/linux/man-pages/man2/statfs.2.html
- https://man.openbsd.org/statfs
- http://lingrok.org/xref/coreutils/src/df.c#893
2017-09-25 18:46:19 -07:00
..
bpool optimize memory allocation during erasure-read by using temporary buffer pool. (#2259) 2016-07-25 14:17:01 -07:00
cgroup sys/stats: return cgroup mem limit, fall back to sysinfo() (#4002) 2017-04-02 10:46:16 -07:00
disk Provide the correct free block size volume/disk information (#4943) 2017-09-25 18:46:19 -07:00
http fix: bufconn and listener tests for megacheck (#4827) 2017-08-20 12:25:08 -07:00
lock posix: Deprecate custom removeAll/mkdirAll implementations. (#4808) 2017-08-12 19:25:43 -07:00
madmin Update minio-go dependency (#4551) 2017-06-19 16:02:35 -07:00
mimedb cleanup: All conditionals simplified under pkg. (#3875) 2017-03-09 10:13:30 -08:00
mountinfo Fail to start server if detected cross-device mounts. (#4807) 2017-08-15 15:10:50 -07:00
objcache cache: Increasing caching GC percent from 20 to 50. (#4041) 2017-04-15 02:16:49 -07:00
quick [security] rpc: Do not transfer access/secret key. (#4857) 2017-09-19 12:37:56 -07:00
safe windows: Support all REPARSE_POINT attrib files properly. (#4203) 2017-05-02 02:35:27 -07:00
sys Enable build on solaris (#4115) 2017-04-23 11:10:18 -07:00
trie trie: new package (#3729) 2017-02-10 11:51:41 -08:00
wildcard pkg/wildcard: Simplify the wildcard logic further. (#2555) 2016-08-27 00:27:17 -07:00
words words: new package Damerau Levenshtein distance function. (#3929) 2017-03-19 14:23:05 -07:00
x/os posix: Deprecate custom removeAll/mkdirAll implementations. (#4808) 2017-08-12 19:25:43 -07:00