After formatting a Reliance Edge volume and mounting it again, it seems that if I try to obtain the number of blocks by calling "red_statvfs()" it is not updating its values. My goal is to make sure that after it formats I have access to its full storage capacity again. Are there other ways to get this information?
The function "red_statvfs()" is actually working as usual, the problem was I did not check if formatting was successful. Please disconsider the topic.
[ed. note: firstname.lastname@example.org last edited this post 2 years ago.]
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 REDSTATFS or metaroot structures.
There is no “other way” to get the free block count.
Excellent - Glad you determined what was happening!
I imagined that this was the only way. Thanks for the support!