micron: fix vs-internal-log file size mismatches vs log headers and missing telemetry host log - #3831
Merged
igaw merged 2 commits intoAug 13, 2026
Conversation
* Fixes possible telemetry log mismatch between the file size and the size reported in the header contained in the file. Keeps the header data from the initial read, which is used to determine the log size, rather than re-reading it. Adds test to avoid regressions. * Requests host telemetry log creation to ensure the host log exists when reading. Signed-off-by: Broc Going <bgoing@micron.com>
For some logs, the buffer/file size calculation double counted the header, which caused the file size to be larger than the log size indicated in the header, with zero-padded values after the end of the log. This change accounts for the header size correctly in these cases. Signed-off-by: Broc Going <bgoing@micron.com>
igaw
reviewed
Aug 13, 2026
| /* log_size includes the header, so the payload is the remainder */ | ||
| uint32_t payload = hdr.log_size - sizeof(hdr); | ||
|
|
||
| buffer = (uint8_t *)libnvme_alloc(hdr.log_size); |
Collaborator
There was a problem hiding this comment.
FWIW, libnvme_alloc returns void *, thus there is no explicit cast necessary. IMO, it reads simpler without the cast.
Collaborator
|
Thanks! |
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.
Cleans up a few minor log issues impacting the output of micron vs-internal-log.