]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make `camcontrol modepage` support block descriptors.
authormav <mav@FreeBSD.org>
Wed, 7 Aug 2019 14:45:10 +0000 (14:45 +0000)
committermav <mav@FreeBSD.org>
Wed, 7 Aug 2019 14:45:10 +0000 (14:45 +0000)
commit8da32f95df478fe6f8165b100d20eeaf3495da79
tree4fb887f961a186fe25c2dcc4906b3d1a29553320
parent74036e59e1757b03fc36928b7b7ae4c4ab0124dd
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.

MFC after: 1 week
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