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
oss
seq
Kconfig -rw-r--r-- 6.2 KB
Makefile -rw-r--r-- 1.2 KB
compress_offload.c -rw-r--r-- 25.9 KB
control.c -rw-r--r-- 46.9 KB
control_compat.c -rw-r--r-- 11.5 KB
ctljack.c -rw-r--r-- 1.5 KB
device.c -rw-r--r-- 5.6 KB
hrtimer.c -rw-r--r-- 4.0 KB
hwdep.c -rw-r--r-- 13.2 KB
hwdep_compat.c -rw-r--r-- 2.3 KB
info.c -rw-r--r-- 22.7 KB
info_oss.c -rw-r--r-- 3.8 KB
init.c -rw-r--r-- 26.3 KB
isadma.c -rw-r--r-- 3.0 KB
jack.c -rw-r--r-- 6.6 KB
memalloc.c -rw-r--r-- 7.5 KB
memory.c -rw-r--r-- 2.5 KB
misc.c -rw-r--r-- 3.9 KB
pcm.c -rw-r--r-- 35.0 KB
pcm_compat.c -rw-r--r-- 15.3 KB
pcm_dmaengine.c -rw-r--r-- 11.2 KB
pcm_lib.c -rw-r--r-- 70.1 KB
pcm_memory.c -rw-r--r-- 13.5 KB
pcm_misc.c -rw-r--r-- 14.8 KB
pcm_native.c -rw-r--r-- 99.1 KB
pcm_timer.c -rw-r--r-- 3.7 KB
pcm_trace.h -rw-r--r-- 3.7 KB
rawmidi.c -rw-r--r-- 47.9 KB
rawmidi_compat.c -rw-r--r-- 3.5 KB
rtctimer.c -rw-r--r-- 4.1 KB
sgbuf.c -rw-r--r-- 4.2 KB
sound.c -rw-r--r-- 10.8 KB
sound_oss.c -rw-r--r-- 7.5 KB
timer.c -rw-r--r-- 50.9 KB
timer_compat.c -rw-r--r-- 3.5 KB
vmaster.c -rw-r--r-- 12.7 KB

back to top