Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Query: ext4 meta data size calculation error? #543

Open
procount opened this issue May 20, 2019 · 2 comments
Open

Query: ext4 meta data size calculation error? #543

procount opened this issue May 20, 2019 · 2 comments
Labels

Comments

@procount
Copy link
Contributor

totaluncompressedsize += /*0.035*/ 0.01 * totalnominalsize; /* overhead for file system meta data */

I think the above line is supposed to add 1% overhead in size to account for the ext4 metadata. But it seems to be adding 1% of the accumulated total of all the partitions so far encountered. Shouldn't it be 1% of the nominal size of THIS partition only?

@lurch
Copy link
Collaborator

lurch commented May 20, 2019

Oooh, well spotted. Given that the code is inside a foreach loop, I suspect that it was supposed to be:

    totaluncompressedsize += /*0.035*/ 0.01 * partition->partitionSizeNominal(); /* overhead for file system meta data */

Looking through the git history, it seems that bug has been there since 2013 😉
And maybe if the bug does get fixed, the "1% overhead" value would need tweaking? 🤷‍♂️

On the plus side, I guess over-estimating the needed space is much better than under-estimating the needed space 😆

@procount
Copy link
Contributor Author

procount commented May 20, 2019

Yeah, that's what I changed mine to.
I spotted it whilst trying to make the progress bar more accurate.
Making good progress, but currently I have to set this tweak parameter to 5% for Raspbian_Full. Not tried any others in anger yet.

@lurch lurch added the question label May 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants