Skip to content

Conversation

@xiaoran007
Copy link
Contributor

The disk SMART module had one critical issue #2759

  • Incorrect SMART data parsing - only reading the first byte (instead of all 16 bytes) of NVMe SMART data_units_read and data_units_written fields

Testing & Verification
Before Fix:
Total read: ~50 MB → resets at ~124 MB
Total written: ~60 MB → resets at ~124 MB
Values meaningless for any drive with significant usage
After Fix:
Total read: 33.7 TB ✓
Total written: 40.7 TB ✓
Values accurately match system tools
Verification with smartctl:

Data Units Read:                    65,878,685 [33.7 TB]
Data Units Written:                 79,581,408 [40.7 TB]

Result from fixed stats:
截屏2025-10-15 15 32 34

Impact
This PR only changes data parsing code, it doesn't impact any other module.

@xiaoran007
Copy link
Contributor Author

Hi, I have reverted the header changes in Disk/header.h to keep this PR minimal and focused only
on fixing the SMART data reading bug.

@exelban exelban merged commit 2dc2761 into exelban:master Oct 26, 2025
1 check passed
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.

2 participants