Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/block/block_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ func disks(ctx *context.Context, paths *linuxpath.Paths) []*Disk {
driveType, storageController := diskTypes(dname)
// TODO(jaypipes): Move this into diskTypes() once abstracting
// diskIsRotational for ease of unit testing
if !diskIsRotational(ctx, paths, dname) {
// Only reclassify HDD to SSD if non-rotational to avoid changing already correct types.
// This addresses changed kernel behavior where rotational detection may be unreliable,
// where some kernels report CD-ROM drives as non-rotational, incorrectly classifying them as SSD.
if !diskIsRotational(ctx, paths, dname) && driveType == DRIVE_TYPE_HDD {
driveType = DRIVE_TYPE_SSD
}
size := diskSizeBytes(paths, dname)
Expand Down