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 inaccurate disk usage reporting for ext* filesystems due to reserved blocks #674

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

ernolf
Copy link
Contributor

@ernolf ernolf commented Sep 4, 2024

Key Changes:

  • Adjust the calculation of the used disk space to include all blocks that cannot be used, including reserved blocks.
  • Modify the disk usage percentage calculation to accurately reflect the true usage relative to the total disk size.
  • Update the percentage display to show up to two decimal places, providing more precise information compared to the previous integer-only display.
  • Ensure that the displayed disk size corresponds to the actual size of the disk, rather than the computed sum of Used and Available blocks.

Testing:

  • Adjust unit tests to verify the correct calculation of disk usage and availability.
  • Manually test on various configurations to ensure accurate reporting across different scenarios.

Related Issue:

before:

image

after:

image

@ernolf ernolf requested a review from kesselb September 4, 2024 12:35
@ernolf ernolf added the bug label Sep 5, 2024
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@kesselb kesselb merged commit de46593 into master Oct 10, 2024
36 checks passed
@kesselb kesselb deleted the ernolf/disksize-fix branch October 10, 2024 17:08
@kesselb
Copy link
Collaborator

kesselb commented Oct 11, 2024

/backport to stable30

@kesselb
Copy link
Collaborator

kesselb commented Oct 11, 2024

/backport to stable29

@kesselb
Copy link
Collaborator

kesselb commented Oct 11, 2024

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inaccurate Disk Usage Reporting for ext* Filesystems Due to Reserved Blocks
3 participants