]> git.baikalelectronics.ru Git - kernel.git/commit
target/file: Add UNMAP emulation support
authorAsias He <asias@redhat.com>
Mon, 25 Feb 2013 06:03:43 +0000 (14:03 +0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 25 Apr 2013 08:05:23 +0000 (01:05 -0700)
commit3768fdc9b643d8d7b63723539732a3bac357fd1a
treecd487389e9013909b44032d115f279944fea7a73
parent3e5d6d3e89934e4795b9dbdbfbc06ba8c663bebe
target/file: Add UNMAP emulation support

This patch adds support for emulation of UNMAP within
fd_execute_unmap() backend code.

If the FILEIO backend is normal file, the emulation uses fallocate to
punch hole to reclaim the free space used by the file. If the FILEIO
backend is block device, the emulation uses blkdev_issue_discard().

Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_file.c