]> git.baikalelectronics.ru Git - kernel.git/commit
cxlflash: Fix data corruption when vLUN used over multiple cards
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Wed, 21 Oct 2015 20:11:26 +0000 (15:11 -0500)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 30 Oct 2015 08:01:07 +0000 (17:01 +0900)
commit2ed63e485e4aace7ad729c1e1bd75662d1093141
treeb6fec4c84c8ed9a99897fa7bfc6397ff7ba48f2d
parent18c40b057962ad15d1239cdae04de7e61029b7d6
cxlflash: Fix data corruption when vLUN used over multiple cards

If the same virtual LUN is accessed over multiple cards, only accesses
made over the first card will be valid. Accesses made over the second
card will go to the wrong LUN causing data corruption.

This is because the global LUN's mode word was being used to determine
whether the LUN table for that card needs to be programmed. The mode
word would be setup by the first card, causing the LUN table for the
second card to not be programmed.

By unconditionally initializing the LUN table (not depending on the
mode word), the problem is avoided.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/cxlflash/vlun.c