alistair23-linux/drivers/target
Nicholas Bellinger d0c8b259f8 target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status
This patch allows IBLOCK to check block hints in request_queue->flush_flags
when reporting current backend device WriteCacheEnabled status to a remote
SCSI initiator port.

This is done via a se_subsystem_api->get_write_cache() call instead of a
backend se_device creation time flag, as we expect REQ_FLUSH bits to possibly
change from an underlying blk_queue_flush() by the SCSI disk driver, or
internal raw struct block_device driver usage.

Also go ahead and update iblock_execute_rw() bio I/O path code to use
REQ_FLUSH + REQ_FUA hints when determining WRITE_FUA usage, and make SPC
emulation code use a spc_check_dev_wce() helper to handle both types of
cases for virtual backend subsystem drivers.

(asias: Drop unnecessary comparsion operators)

Reported-by: majianpeng <majianpeng@gmail.com>
Cc: majianpeng <majianpeng@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-02-13 11:27:51 -08:00
..
iscsi iscsi-target: make some temporary buffers larger 2013-02-13 11:27:51 -08:00
loopback target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
sbp sbp-target: fix error path in sbp_make_tpg() 2012-12-12 21:17:25 -08:00
tcm_fc tcm_fc: Do not report target role when target is not defined 2013-01-10 20:08:58 -08: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: Use TCM_NO_SENSE for initialisation 2013-01-10 20:07:10 -08: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/configfs: use kmalloc() instead of kzalloc() for default groups 2012-11-27 22:49:24 -08:00
target_core_device.c target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status 2013-02-13 11:27:51 -08:00
target_core_fabric_configfs.c target: Fix regression allowing unconfigured devices to fabric port link 2013-01-31 15:13:23 -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: merge fd_do_readv() and fd_do_writev() 2012-12-05 13:09:45 -08:00
target_core_file.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_hba.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_iblock.c target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status 2013-02-13 11:27:51 -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: Add/check max_write_same_len device attribute + update block limits VPD 2012-11-15 12:27:21 -08:00
target_core_pr.c target: Use TCM_NO_SENSE for initialisation 2013-01-10 20:07:10 -08: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: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_pscsi.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_rd.c target/rd: improve sg_table lookup scalability 2013-02-13 11:27:31 -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: Fix zero-length READ_CAPACITY_16 regression 2013-01-29 14:24:26 -08:00
target_core_spc.c target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status 2013-02-13 11:27:51 -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/iscsi_target: Add NodeACL tags for initiator group support 2012-12-13 14:18:09 -08:00
target_core_transport.c target: change sprintf to snprintf in transport_dump_vpd_ident 2013-02-13 11:27:31 -08: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