]> git.baikalelectronics.ru Git - kernel.git/commit
target/iblock: Fix WCE=1 + DPOFUA=1 backend WRITE regression
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 15 May 2013 06:41:04 +0000 (23:41 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 15 May 2013 08:46:34 +0000 (01:46 -0700)
commita386106ce819a5ef4e6fa9e8126c8c67b086b4d1
treed15a115283f546b9c2f27949ea340404b9682c11
parent5a17e182d6ddfc404a9ef90100c207ef332a98dc
target/iblock: Fix WCE=1 + DPOFUA=1 backend WRITE regression

This patch fixes a regression bug introduced in v3.9-rc1 where if the
underlying struct block_device for a IBLOCK backend is configured with
WCE=1 + DPOFUA=1 settings, the rw = WRITE assignment no longer occurs
in iblock_execute_rw(), and rw = 0 is passed to iblock_submit_bios()
in effect causing a READ bio operation to occur.

The offending commit is:

commit 836bc12c492423ce261dec293df3e966b0933d00
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Tue Jan 29 22:10:06 2013 -0800

    target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status

Note the WCE=1 + DPOFUA=0, WCE=0 + DPOFUA=1, and WCE=0 + DPOFUA=0 cases
are not affected by this regression bug.

Reported-by: Chris Boot <bootc@bootc.net>
Tested-by: Chris Boot <bootc@bootc.net>
Reported-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_iblock.c