Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage calculation to account for sparse files #163

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

dmcgowan
Copy link
Member

The current usage calculation does not correctly account for usage within spares files. To correctly account for the usage, the number of blocks must be used rather than the reported file size.

Signed-off-by: Derek McGowan <derek@mcg.dev>
The current usage calculation does not account for usage within
spares files. To correctly account for the usage, the number of
blocks must be used rather than the reported file size.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@thaJeztah
Copy link
Member

@chris-crone you love storage; perhaps you want to review as well?

@crosbymichael
Copy link
Member

LGTM

Copy link

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

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

This makes sense to me but I don't know the code well enough to give a proper review :)

@justincormack
Copy link
Contributor

I mean, no value is really correct with COW filesystems, tail packing, etc. What is the issue that this is trying to fix (I was told there was one).

@dmcgowan
Copy link
Member Author

@justincormack this messes up ephemeral storage accounting in k8s when there are sparse files

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

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.

6 participants