heal: calculate the number of workers based on NRRequests (#17945)

This commit is contained in:
Anis Eleuch
2023-09-11 14:48:54 -07:00
committed by GitHub
parent 9878031cfd
commit 41de53996b
10 changed files with 131 additions and 61 deletions

View File

@@ -37,6 +37,7 @@ type Info struct {
Minor uint32
Name string
Rotational *bool
NRRequests uint64
}
// DevID is the drive major and minor ids

View File

@@ -98,6 +98,7 @@ func GetInfo(path string, firstTime bool) (info Info, err error) {
}
}
if err == nil {
info.NRRequests = qst.NRRequests
rot := qst.Rotational == 1 // Rotational is '1' if the device is HDD
info.Rotational = &rot
}