]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350676, r350677: Make `camcontrol modepage` support block descriptors.
authorAlexander Motin <mav@FreeBSD.org>
Tue, 27 Aug 2019 03:55:38 +0000 (03:55 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 27 Aug 2019 03:55:38 +0000 (03:55 +0000)
commit188663349b86a8c4adeb063188de87775e90a846
treec106b254bef362bfcb64d391fbbd3ae0b801bb5d
parent254b778e5cb28a5c8c2bc832786dded3a280b55c
MFC r350676, r350677: Make `camcontrol modepage` support block descriptors.

It allows to read and write block descriptors alike to mode page parameters.
It allows to change block size or short-stroke HDDs or overprovision SSDs.
Depenting on -P parameter the change can be either persistent or till reset.
In case of block size change device may need reformat after the setting.
In case of SSD overprovisioning format or sanitize may be needed to really
free the flash.

During implementation appeared that csio_encode_visit() can not handle
integers of more then 4 bytes, that makes 8-byte LBA handling awkward.
I had to split it into two 4-byte halves now.

Relnotes: yes
Sponsored by: iXsystems, Inc.
sbin/camcontrol/camcontrol.8
sbin/camcontrol/camcontrol.c
sbin/camcontrol/camcontrol.h
sbin/camcontrol/modeedit.c
sys/cam/scsi/scsi_all.c
sys/cam/scsi/scsi_all.h