Display TRIM/UNMAP support in "diskinfo -v"
Details
Tested it by hand with a mix of hard drives, comparing against "sg_opcodes" and "camcontrol identify"
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 11859 Build 12197: arc lint + arc unit
Event Timeline
Generally looks good to me, but I'd probably moved it somewhere before zone mode, and may be also added then GEOM::rotation_rate, GEOM::lunid and GEOM::lunname for completeness.
Any reason we can't export all the geom attributes? Or do we not have a good way to enumerate them? If not, I totally agree with @mav and @allanjude
There's no way to enumerate all attributes, and some of them (like lunid) aren't available through DIOCGATTR. Plus some, like rotationrate, are complicated to interpret. I'm adding rotationrate right now, but I don't the others (frontstuff, hba_vendor, hba_device, hba_subvendor, hba_subdevice, kerneldump, and setstate) are worthwhile.
usr.sbin/diskinfo/diskinfo.c | ||
---|---|---|
298 | "None" might be better here, though that's a pretty fine hair to split. |