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

Commit 72c03850 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target: Add internal READ_INSERT support



This patch adds READ_INSERT support in target_read_prot_action() that
invokes sbc_dif_generate() when LIO is responsible for generating the
outgoing T10-PI.

Required for supporting fabrics that exchange protection information,
and would like to function with un-protected devices.

Reviewed-by: default avatarMartin Petersen <martin.petersen@oracle.com>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent fdeab852
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1994,6 +1994,12 @@ static bool target_read_prot_action(struct se_cmd *cmd)
			}
			}
		}
		}
		break;
		break;
	case TARGET_PROT_DIN_INSERT:
		if (cmd->se_sess->sup_prot_ops & TARGET_PROT_DIN_INSERT)
			break;

		sbc_dif_generate(cmd);
		break;
	default:
	default:
		break;
		break;
	}
	}