Currently PowerCycles field of Log Page is 0 and it is an invalid value.
this patch will initial the PowerCycles data to 1
Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Differential D32558
bhyve: initial PowerCycles value wanpengqian_gmail.com on Oct 19 2021, 11:59 AM. Authored by Tags None Referenced Files
Details
Currently PowerCycles field of Log Page is 0 and it is an invalid value. this patch will initial the PowerCycles data to 1 Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com> In Windows/Linux/FreeBSD guests, print the Log Page to comfirm.
Diff Detail
Event TimelineComment Actions Thank you for doing this! Overall, it looks good but needs a few minor changes.
Comment Actions Update as comments requested.
Comment Actions Go ahead and add back the memcpy, and I am happy with this change.
Comment Actions After some further thought, I've changed my mind and don't believe it makes sense to include the "power on hours" calculation. The goal of this value in actual hardware is to provide a (weak) heuristic to predict when to replace the drive. But this doesn't make sense for an emulated drive. Correcting the initialization of power on count seems like a good change, but the addition of a synthetic hours doesn't. Comment Actions I totally agree with you that PowerOnHours absolute value is meaningless within the virtual machine level. But the difference between each PowerOnHours is usable. For example, After 3 hours, software should inspect that the PowerOnHours value should be increased 3 instead of a fixed value or remain 0. That is abnormal behavior for this very NVMe controller. Take the D24202 patch as a real example. the virtual controller temperature is meaningless, But without this patch, some software/OS will reject running. Comment Actions D24202 is not a good example as the compliance tests check some of those values. To the best of my knowledge, the tests do not check power on hours. Comment Actions Although I insist on adding the calculation of PowerOnHours. For now, this patch only adds the init value of PowerCycles. |