Skip to content

Use f_bavail instead of f_bfree#33

Merged
ericaltendorf merged 5 commits into
ericaltendorf:developmentfrom
nuyawktuah:bavail
Mar 1, 2021
Merged

Use f_bavail instead of f_bfree#33
ericaltendorf merged 5 commits into
ericaltendorf:developmentfrom
nuyawktuah:bavail

Conversation

@nuyawktuah

Copy link
Copy Markdown
Contributor

I noticed a discrepancy between the output of df and GBfree in plotman. Did a bit of digging and it turns out that df uses f_bavail, which doesn't include the blocks allocated to root, 5% of the total by default [0]. Plotman uses f_bfree which includes all blocks. I'm no linux expert but it seems more accurate to report the writable blocks. In fact, some people recommend removing the reserved blocks to unlock extra space [1].

This pr replaces the use of f_bfree with f_bavail. I'm not familiar enough with the whole codebase to know what kind of side effects this might have but I definitely prefer it for monitoring my plots.

[0] https://www.linuxquestions.org/questions/aix-43/diff-between-f_bavail-and-f_bfree-in-statfs-sys-call-207272/
[1] keybase://chat/chia_network.public#farming-hardware/11861

@ericaltendorf ericaltendorf changed the base branch from main to development March 1, 2021 05:25

@ericaltendorf ericaltendorf left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ericaltendorf ericaltendorf merged commit c22fb13 into ericaltendorf:development Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants