Skip to content

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>
@dmcgowan dmcgowan force-pushed the fix-sparse-file-usage branch from d863222 to bc5e3ed Compare November 19, 2020 07:38
@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