linux/drivers/target
Christophe Vu-Brugier 9bc6548f37 target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0
A check that rejects a CDB with FUA bit set if no write cache is
emulated was added by the following commit:

  fde9f50 target: Add sanity checks for DPO/FUA bit usage

The condition is as follows:

  if (!dev->dev_attrib.emulate_fua_write ||
      !dev->dev_attrib.emulate_write_cache)

However, this check is wrong if the backend device supports WCE but
"emulate_write_cache" is disabled.

This patch uses se_dev_check_wce() (previously named
spc_check_dev_wce) to invoke transport->get_write_cache() if the
device has a write cache or check the "emulate_write_cache" attribute
otherwise.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-03-19 23:26:46 -07:00
..
iscsi iscsi-target: Avoid early conn_logout_comp for iser connections 2015-03-19 23:10:01 -07:00
loopback loop/usb/vhost-scsi/xen-scsiback: Fix use of __transport_register_session 2015-03-19 23:15:14 -07:00
sbp
tcm_fc tcm_fc: missing curly braces in ft_invl_hw_context() 2015-03-19 23:26:41 -07:00
Kconfig
Makefile
target_core_alua.c
target_core_alua.h
target_core_configfs.c
target_core_device.c target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 2015-03-19 23:26:46 -07:00
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-02-21 13:21:19 -08:00
target_core_file.h
target_core_hba.c
target_core_iblock.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-02-21 13:21:19 -08:00
target_core_iblock.h
target_core_internal.h
target_core_pr.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-02-21 13:21:19 -08:00
target_core_pr.h
target_core_pscsi.c target/pscsi: Fix NULL pointer dereference in get_device_type 2015-03-19 23:26:42 -07:00
target_core_pscsi.h
target_core_rd.c target: Drop left-over fabric_max_sectors attribute 2015-01-09 15:22:05 -08:00
target_core_rd.h
target_core_sbc.c target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 2015-03-19 23:26:46 -07:00
target_core_spc.c target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 2015-03-19 23:26:46 -07:00
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c target: Fix reference leak in target_get_sess_cmd() error path 2015-03-19 23:26:31 -07:00
target_core_ua.c
target_core_ua.h
target_core_user.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
target_core_xcopy.c
target_core_xcopy.h