Page MenuHomeFreeBSD

Display TRIM/UNMAP support in "diskinfo -v"
ClosedPublic

Authored by asomers on Oct 3 2017, 7:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 11:08 PM
Unknown Object (File)
Thu, May 9, 4:50 PM
Unknown Object (File)
Wed, May 1, 12:23 AM
Unknown Object (File)
Thu, Apr 25, 10:07 PM
Unknown Object (File)
Mar 22 2024, 10:37 PM
Unknown Object (File)
Mar 22 2024, 10:37 PM
Unknown Object (File)
Mar 22 2024, 10:37 PM
Unknown Object (File)
Mar 22 2024, 10:37 PM
Subscribers

Details

Summary

Display TRIM/UNMAP support in "diskinfo -v"

Test Plan

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 Not Applicable
Unit
Tests Not Applicable

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.

I agree with @mav about adding any other useful bits from GEOM that are available.

This revision is now accepted and ready to land.Oct 3 2017, 7:57 PM

I agree with @mav about adding any other useful bits from GEOM that are available.

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

but even this amount is good, so I'm clicking approve.

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.

Add rotation rate to diskinfo -v

This revision now requires review to proceed.Oct 3 2017, 8:54 PM
This revision is now accepted and ready to land.Oct 3 2017, 8:59 PM
usr.sbin/diskinfo/diskinfo.c
303 ↗(On Diff #33664)

"None" might be better here, though that's a pretty fine hair to split.

This revision was automatically updated to reflect the committed changes.