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)
Oct 10 2024, 10:00 AM
Unknown Object (File)
Sep 24 2024, 3:48 AM
Unknown Object (File)
Sep 5 2024, 4:15 PM
Unknown Object (File)
Sep 3 2024, 12:13 AM
Unknown Object (File)
Sep 1 2024, 7:02 AM
Unknown Object (File)
Aug 21 2024, 5:50 PM
Unknown Object (File)
Aug 20 2024, 11:57 PM
Unknown Object (File)
Jul 24 2024, 2:59 AM
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.