mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
zfs filesystem skipped by df -h
On full pool when pool root filesystem references very few bytes, the f_blocks returned to statvfs is 0 but should be at least 1. Reviewed by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Closes #8253 Closes #8254
This commit is contained in:
committed by
Brian Behlendorf
parent
a13392a6a1
commit
83c796c5e9
@@ -1449,6 +1449,8 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp)
|
||||
* "preferred" size.
|
||||
*/
|
||||
|
||||
/* Round up so we never have a filesytem using 0 blocks. */
|
||||
refdbytes = P2ROUNDUP(refdbytes, statp->f_bsize);
|
||||
statp->f_blocks = (refdbytes + availbytes) >> bshift;
|
||||
statp->f_bfree = availbytes >> bshift;
|
||||
statp->f_bavail = statp->f_bfree; /* no root reservation */
|
||||
|
||||
Reference in New Issue
Block a user