4 ms·
> BTRFS - Adjust statfs() space utilization calculations according to RAID profiles Does this mean df will finally show the correct values for btrfs raid volum
by smellf 12y ago
> BTRFS - Adjust statfs() space utilization calculations according to RAID profiles
Does this mean df will finally show the correct values for btrfs raid volumes? Does anyone know if the statfs() syscall is what df uses? There is no call to statfs() in the df source I found here [1].
[1] https://searchcode.com/codesearch/view/17947198/ https://searchcode.com/codesearch/view/17947198/
- txutxu 12y ago> Does anyone know if the statfs() syscall is what df uses? There is no call to statfs() in the df source I found here [1]. Yes, it looks like df uses that: # strace -e statfs df /tmp statfs("/tmp", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=4128490, f_bfree=4084457, f_bavail=3874742, f_files=1048576, f_ffree=1048564, f_fsid={1972973117, 2058115910}, f_namelen=255, f_frsize=4096}) = 0 ...
- joshka 12y agohttps://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ba7b6e62f420f5a8832bc161ab0c7ba767f65b3d https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.... === This has been discussed in thread: http://thread.gmane.org/gmane.comp.file-systems.btrfs/32528 http://thread.gmane.org/gmane.comp.file-systems.btrfs/32528 and this patch implements this proposal: http://thread.gmane.org/gmane.comp.file-systems.btrfs/32536 http://thread.gmane.org/gmane.comp.file-systems.btrfs/32536 Works fine for "clean" raid profiles where the raid factor correction does the right job. Otherwise it's pessimistic and may show low space although there's still some left. The df nubmers are lightly wrong in case of mixed block groups, but this is not a major usecase and can be addressed later. The RAID56 numbers are wrong almost the same way as before and will be addressed separately. === I'm most interested in the deadlock fix which finally made it in. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9e0af23764344f7f1b68e4eefbe7dc865018b63d https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....
- cnvogel 12y agoYes, the deadlock fix really is appreciated. I had to turn off compression on all my machines :-(.