]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r264274, r264279, r264283, r264296, r264297:
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 8 May 2014 07:00:45 +0000 (07:00 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 8 May 2014 07:00:45 +0000 (07:00 +0000)
commit580592f71de6edd2f527a4fd716f6991dd1b0396
treec75899a669ba98fd8ca7a2f96c817567197fb91c
parent9cf0425b530b7817c0454b1654a4358801189c90
MFC r264274, r264279, r264283, r264296, r264297:
Add support for SCSI UNMAP commands to CTL.

This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10)
and WRITE SAME(16).  WRITE SAME commands support both normal write mode
and UNMAP flag.  To properly report UNMAP capabilities this patch also adds
support for reporting two new VPD pages: Block limits and Logical Block
Provisioning.

UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm
create` command line or "option unmap on" to lun sections of /etc/ctl.conf.

At this moment UNMAP supported for ramdisks and device-backed block LUNs.
It was tested to work great with ZFS ZVOLs.  For file-backed LUNs UNMAP
support is unfortunately missing due to absence of respective VFS KPI.

Sponsored by:   iXsystems, Inc

git-svn-id: svn://svn.freebsd.org/base/stable/10@265634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl_backend.h
sys/cam/ctl/ctl_backend_block.c
sys/cam/ctl/ctl_backend_ramdisk.c
sys/cam/ctl/ctl_cmd_table.c
sys/cam/ctl/ctl_io.h
sys/cam/ctl/ctl_private.h
sys/cam/ctl/ctl_ser_table.c
sys/cam/scsi/scsi_all.h