Skip to content

Updating free space available after red_format() #21

Answered by Tuxera-TonyQ
Tuxera-TonyQ asked this question in Q&A
Discussion options

You must be logged in to vote

I'm glad you figured this out! Here is what we were going to share, just for future reference, and perhaps to help others:

The f_bfree and f_bavail members of the REDSTATFS structure are taken straight from the free block count in the metaroot. During reformat, both metaroots are rewritten with a reset free block count. Thus, those values should be reset, assuming the red_format(), red_mount(), and red_statvfs() all completed successfully.

If nothing is failing, then perhaps you are running into some unexpected error condition, e.g.: a) silent failure to overwrite the metaroots during the reformat; or b) data cache synchronization problems which cause the code to see stale values in the R…

Replies: 1 comment

Comment options

Tuxera-TonyQ
Feb 10, 2023
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by Tuxera-TonyQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant