Revision 9bc6548f372d8c829235095d91de99d8df79db6e authored by Christophe Vu-Brugier on 19 March 2015, 13:30:13 UTC, committed by Nicholas Bellinger on 20 March 2015, 06:26:46 UTC
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>
1 parent 5f7da04
History
File Mode Size
image
Kconfig -rw-r--r-- 303 bytes
Makefile -rw-r--r-- 345 bytes
Platform -rw-r--r-- 182 bytes
at93c.c -rw-r--r-- 2.5 KB
at93c.h -rw-r--r-- 292 bytes
ds1603.c -rw-r--r-- 3.1 KB
ds1603.h -rw-r--r-- 509 bytes
interrupt.c -rw-r--r-- 3.4 KB
lasat_board.c -rw-r--r-- 7.0 KB
lasat_models.h -rw-r--r-- 1.6 KB
picvue.c -rw-r--r-- 4.3 KB
picvue.h -rw-r--r-- 918 bytes
picvue_proc.c -rw-r--r-- 4.5 KB
prom.c -rw-r--r-- 2.8 KB
prom.h -rw-r--r-- 162 bytes
reset.c -rw-r--r-- 1.6 KB
serial.c -rw-r--r-- 3.0 KB
setup.c -rw-r--r-- 3.7 KB
sysctl.c -rw-r--r-- 6.0 KB

back to top