Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f16ec43 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ee920469
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -774,7 +774,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
		sg_num--;
		sg_num--;
	}
	}


	if (cmd->prot_type) {
	if (cmd->prot_type && dev->dev_attrib.pi_prot_type) {
		int rc = iblock_alloc_bip(cmd, bio_start);
		int rc = iblock_alloc_bip(cmd, bio_start);
		if (rc)
		if (rc)
			goto fail_put_bios;
			goto fail_put_bios;