IB/iser: Implement check_protection
Once the iSCSI transaction is completed we must implement check_protection in order to notify on DIF errors that may have occured. The routine boils down to calling ib_check_mr_status to get the signature status of the transaction. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Alex Tabachnik <alext@mellanox.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:

committed by
Roland Dreier

parent
55e51eda48
commit
0a7a08ad6f
@@ -306,6 +306,18 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task)
|
||||
}
|
||||
}
|
||||
|
||||
static u8 iscsi_iser_check_protection(struct iscsi_task *task, sector_t *sector)
|
||||
{
|
||||
struct iscsi_iser_task *iser_task = task->dd_data;
|
||||
|
||||
if (iser_task->dir[ISER_DIR_IN])
|
||||
return iser_check_task_pi_status(iser_task, ISER_DIR_IN,
|
||||
sector);
|
||||
else
|
||||
return iser_check_task_pi_status(iser_task, ISER_DIR_OUT,
|
||||
sector);
|
||||
}
|
||||
|
||||
static struct iscsi_cls_conn *
|
||||
iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
|
||||
{
|
||||
@@ -742,6 +754,7 @@ static struct iscsi_transport iscsi_iser_transport = {
|
||||
.xmit_task = iscsi_iser_task_xmit,
|
||||
.cleanup_task = iscsi_iser_cleanup_task,
|
||||
.alloc_pdu = iscsi_iser_pdu_alloc,
|
||||
.check_protection = iscsi_iser_check_protection,
|
||||
/* recovery */
|
||||
.session_recovery_timedout = iscsi_session_recovery_timedout,
|
||||
|
||||
|
Reference in New Issue
Block a user