diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-28 06:14:16 (GMT) |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-04-08 06:27:44 (GMT) |
commit | 6f16ec43e06e37dc5c3bed52ae76803c13ee2f8c (patch) | |
tree | 9d6b619bccedb03e879648e98dc3806e7666be57 /drivers | |
parent | ee920469d61e896d124fec528250ecfba1ec9f8d (diff) | |
download | linux-6f16ec43e06e37dc5c3bed52ae76803c13ee2f8c.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_iblock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 2520cbf..1b7947c 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -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; |