]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/target/target_core_transport.c
target: fix DPO and FUA bit checks
authorChristoph Hellwig <hch@lst.de>
Mon, 20 Apr 2015 13:00:30 +0000 (15:00 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:41:44 +0000 (22:41 -0700)
commit814e5b45182f4aaf6c0b0deac7104bc2cba5109e
treea0cfcd51f0854718d2f8de018c893e5f65b3a8f7
parentc04a6091c951c88636a569cdd29feb65fb5003af
target: fix DPO and FUA bit checks

Drivers may override the WCE flag, in which case the DPOFUA flag in
MODE SENSE might differ from the check used to reject invalid FUA
bits in sbc_check_dpofua.  Also now that we reject invalid FUA
bits early there is no need to duplicate the same buggy check
down in the fileio code.

As the DPOFUA flag controls th support for FUA bits on read and
write commands as well as DPO key off all the checks off a single
helper, and deprecate the emulate_dpo and emulate_fua_read attributs.

This fixes various failures in the libiscsi testsuite.

Personally I'd prefer to also remove the emulate_fua_write attribute
as there is no good reason to disable it, but I'll leave that for
a separate discussion.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_device.c
drivers/target/target_core_file.c
drivers/target/target_core_internal.h
drivers/target/target_core_sbc.c
drivers/target/target_core_spc.c
drivers/target/target_core_transport.c
include/target/target_core_base.h