From: Asias He Date: Mon, 25 Feb 2013 06:03:42 +0000 (+0800) Subject: target/file: Add WRITE_SAME w/ UNMAP=1 emulation support X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~96^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d3ae5c80758cb2bf3cf1e0d5b2c89d040de90b;p=pandora-kernel.git target/file: Add WRITE_SAME w/ UNMAP=1 emulation support This patch adds support for emulation of WRITE_SAME w/ UNMAP=1 within fd_execute_write_same_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(). Tested with 512, 1k, 2k, and 4k block_sizes. Changes in v2: - Set the various dev->dev_attrib.*unmap* values (nab) Cc: Christoph Hellwig Cc: Martin K. Petersen Cc: Nicholas Bellinger Signed-off-by: Asias He Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed