forked from luck/tmp_suning_uos_patched
target/iblock: Add checks for backend DIF emulation
Make sure that IBLOCK only attempts to use backend DIF emulation when it's actually enabled at device level. Cc: Martin Petersen <martin.petersen@oracle.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
ee920469d6
commit
6f16ec43e0
@ -774,7 +774,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
|
||||
sg_num--;
|
||||
}
|
||||
|
||||
if (cmd->prot_type) {
|
||||
if (cmd->prot_type && dev->dev_attrib.pi_prot_type) {
|
||||
int rc = iblock_alloc_bip(cmd, bio_start);
|
||||
if (rc)
|
||||
goto fail_put_bios;
|
||||
|
Loading…
Reference in New Issue
Block a user