[stgt] [PATCH 2/2] Add SBC UNMAP command and thin provisioning to tgtd

ronnie sahlberg ronniesahlberg at gmail.com
Sat Mar 31 05:29:42 CEST 2012


Please find attached a patch to TGTD that adds emulation of SBC UNMAP command.

The unmap command is implemented so that when the LUN attribute
"--params thin_provisioning=1" is set
it will try to release the affected region of the LUN image by calling
fallocate(... FALLOC_FL_PUNCH_HOLE ...) to release the blocks back to
the underlying filesystem.
This only works for some filesystems under linux at this point.

READ_CAPACITY16 is updated to set LPBME and LBPRZ for thin-provisioned LUNs.

VPD page b2 is added which reports the support for provisioning.
When the thin_provisioning attribute is updated we update the VPD page
accordingly too.

ronnie sahlberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-SBC-UNMAP-Add-support-for-thin-provisioning-and-the-.patch.gz
Type: application/x-gzip
Size: 3724 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120331/3a75cdc4/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-SBC-UNMAP-Add-support-for-thin-provisioning-and-the-.patch
Type: text/x-diff
Size: 10142 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120331/3a75cdc4/attachment-0001.patch>

More information about the stgt mailing list