[stgt] [PATCH] Add support for SBC GET_LBA_STATUS opcode

ronnie sahlberg ronniesahlberg at gmail.com
Tue May 29 13:43:12 CEST 2012


Tomo,

Please find attached a patch that adds support for the opcode
GET_LBA_STATUS for thin-provisioned luns.


This patch uses the new lseek()  SEEK_DATA/SEEK_HOLE to find what is
mapped and what is not on a sparse backend file.
These two new features are very new and only available on very recent
linux kernels and select filesystems.


Linux 3.2  and BTRFS  (mint13 for example)  support these two new seek types.
If SEEK_DATA/SEEK_HOLE is not available we emulate these as always
returning that the specified offset is mapped,   and that the next
"hole" is at end-of-file, i.e. as if the file was not sparse at all.



regards
ronnie sahlberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SBC-Add-GET_LBA_STATUS-support.patch.gz
Type: application/x-gzip
Size: 1639 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120529/1087449c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SBC-Add-GET_LBA_STATUS-support.patch
Type: application/octet-stream
Size: 4227 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120529/1087449c/attachment-0001.obj>


More information about the stgt mailing list