Adjust Disk Size (Windows.plugin)#21081
Merged
thiagoftsm merged 2 commits intonetdata:masterfrom Oct 1, 2025
Merged
Conversation
ilyam8
reviewed
Oct 1, 2025
ilyam8
reviewed
Oct 1, 2025
| // https://devblogs.microsoft.com/oldnewthing/20071101-00/?p=24613 | ||
| // We are using the variable that should not be affected by qyota () | ||
| if ((GetDriveTypeA(path) != DRIVE_FIXED) || !GetDiskFreeSpaceExA(path, | ||
| if ((GetDriveTypeA(path) == DRIVE_UNKNOWN) || !GetDiskFreeSpaceExA(path, |
Member
There was a problem hiding this comment.
Can you briefly explain this change? Why? Doesn't look like a problem to me, but I'd like to hear "why".
Contributor
Author
There was a problem hiding this comment.
Sure. If the driver cannot be identified, it indicates that the next function could fail.
If the driver can be identified, I try to get the data directly from GetDiskFreeSpaceExA. If that fails, I use Perflib.
The idea is to use Perflib only if there is no way to get the data from the Windows API.
ilyam8
approved these changes
Oct 1, 2025
stelfrag
approved these changes
Oct 1, 2025
stelfrag
pushed a commit
to stelfrag/netdata
that referenced
this pull request
Oct 3, 2025
(cherry picked from commit f16d13c)
Merged
Ferroin
pushed a commit
that referenced
this pull request
Oct 15, 2025
(cherry picked from commit f16d13c)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a simplified version of #21059 addressing only disk sizes.
There are other issues which will be address in original PR.
Master Branch:

This PR:

Test Plan
disk.usagedisk.usageAdditional Information
For users: How does this change affect me?