storage: use f_frsize, not f_bsize, for calculating available space
The bfree and blocks fields are supposed to be in units of frsize. We were calculating capacity correctly using those units, but the available calculation was using bsize instead. Most file systems report these as the same value specifically because many programs are buggy, but that is no reason to rely on that behavior, or to behave inconsistently. This bug has been present since e266ded2 (2008) and aa296e6c, when the code was originally introduced (the latter via cut and paste). Signed-off-by: NSage Weil <sage@newdream.net>
Showing
想要评论请 注册 或 登录