Repository navigation
Report FreeBSD disk types and Windows partitions without a drive letter - #3896
Conversation
GeomDiskList already read geom disk list and skipped its rotationrate line. sys/geom/geom_disk.c prints 0 for a drive that reports itself non-rotating, the RPM for one that spins, and unknown or invalid otherwise; map those to SSD, HDD and Unknown, and pass the type through the JNA and FFM disk store factories.
Both backends skipped a Win32_DiskPartition that no Win32_LogicalDisk maps to, so the EFI system, Microsoft reserved and recovery partitions were missing from getPartitions(). Add them with the size Win32_DiskPartition already returns and no UUID, label or mount point, through a helper shared by both backends.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
* Report Solaris thread page faults SolarisOSThread already read each LWP's lwpusage for times and context switches but dropped pr_minf and pr_majf, which SolarisOSProcess reads from the same struct. The OSThread javadoc said Linux only, though every BSD also reports both counts. The CHANGELOG includes #3896's entry, which merges first. * Read Solaris and NetBSD thread usage from the thread, not the process Review round 1. PsInfo.queryPrUsage read /proc/<pid>/lwp/<tid>/usage, which does not exist; proc(4) names it lwpusage (504 bytes, the same prusage_t as the process's usage, on Solaris 11.4 SPARC). Pre-existing: every Solaris thread fell back to lwpsinfo, so kernel time and context switches were always 0. SolarisOSThread now assigns each field once, so an unlocked reader never sees a transient zero. NetBSD's ps reads cputime, majflt, minflt, nvcsw and nivcsw from the process (PUVAR in bin/ps/keyword.c), so every LWP row repeated the process totals. Threads now read ltime, the LWP's own CPU time, and no longer request the others, which the kernel does not keep per LWP. The OSThread javadoc drops NetBSD from the fault and context-switch platforms.
Part of the pre-7.8.0 API gap work, disks and partitions group.
Changes
GeomDiskListalready parsedgeom disk listbut skipped itsrotationrate:line. Persys/geom/geom_disk.c, the kernel prints0for a drive that reports itself non-rotating, the RPM for one that spins, andunknownorinvalidotherwise. These now map toSSD,HDDandUnknown. The type is passed through the JNA and FFM factories toAbstractHWDiskStore's existingdiskType. DragonFly BSD has nogeomand still reportsUnknown.Win32_DiskPartitionthat noWin32_LogicalDiskmaps to, so EFI system, Microsoft reserved and recovery partitions were missing. They are now listed, using theSizethat query already returns, with empty UUID, label and mount point. A helper inWindowsHWDiskStoreserves both twins, so they cannot diverge.HWDiskStore.getDiskType()javadoc now names the FreeBSD source.Verification
rotationrate: 0, so its disks will reportSSD. The parse is covered by fixture tests for each form.WmiComparisonTestin CI. I couldn't run it locally (macOS host).Summary by CodeRabbit