1
0
Fork 0
alistair23-linux/drivers/target
Asias He 70d3ae5c80 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 <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>
2013-04-25 01:05:23 -07:00
..
iscsi target/iscsi: Use ISCSI_LOGIN_CURRENT/NEXT_STAGE macros 2013-04-25 01:05:22 -07:00
loopback target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
sbp Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-03-02 11:43:27 -08:00
tcm_fc tcm_fc: using kfree_rcu() to simplify the code 2013-04-25 01:05:23 -07:00
Kconfig sbp-target: Initial merge of firewire/ieee-1394 target mode support 2012-05-09 15:25:17 -07:00
Makefile target: move code for CDB emulation 2012-07-16 17:27:45 -07:00
target_core_alua.c target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs 2013-04-11 01:48:49 -07:00
target_core_alua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00
target_core_configfs.c target: Add device attribute to expose config_item_name for INQUIRY model 2013-02-13 11:27:58 -08:00
target_core_device.c target: Fix lookup of dynamic NodeACLs during cached demo-mode operation 2013-02-18 18:47:20 -08:00
target_core_fabric_configfs.c target: Add missing mapped_lun bounds checking during make_mappedlun setup 2013-02-18 18:47:28 -08:00
target_core_fabric_lib.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_file.c target/file: Add WRITE_SAME w/ UNMAP=1 emulation support 2013-04-25 01:05:23 -07:00
target_core_file.h target/file: Bump FD_MAX_SECTORS to 2048 to handle 1M sized I/Os 2013-03-19 17:24:28 -07:00
target_core_hba.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_iblock.c target: Add __exit annotation for module_exit functions 2013-02-27 19:12:10 -08:00
target_core_iblock.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_internal.h target: Fix lookup of dynamic NodeACLs during cached demo-mode operation 2013-02-18 18:47:20 -08:00
target_core_pr.c target: writev() on single-element vector is pointless 2013-02-26 02:46:11 -05:00
target_core_pr.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00
target_core_pscsi.c target/pscsi: Reject cross page boundary case in pscsi_map_sg 2013-03-19 17:31:14 -07:00
target_core_pscsi.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_rd.c target_core_rd: break out unterminated loop during copy 2013-02-13 11:54:29 -08:00
target_core_rd.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_sbc.c target_core_sbc: use noop for SYNCHRONIZE_CACHE 2013-03-18 12:31:16 -07:00
target_core_spc.c target: Fix parameter list length checking in MODE SELECT 2013-02-13 12:16:11 -08:00
target_core_stat.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_tmr.c target: Remove useless if statement 2013-02-13 11:27:22 -08:00
target_core_tpg.c target: fix possible memory leak in core_tpg_register() 2013-03-18 12:45:52 -07:00
target_core_transport.c target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case 2013-03-28 23:42:47 -07:00
target_core_ua.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_ua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00