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
Attachment:
0001-SBC-Add-GET_LBA_STATUS-support.patch.gz
Description: GNU Zip compressed data
Attachment:
0001-SBC-Add-GET_LBA_STATUS-support.patch
Description: Binary data