pdu: Introduce iscsi_cancel_pdus()
Introduce a helper exported from lib/pdu.c which cancels all pdus for a given context. This patch eliminates repeated code from various other files which have the same purpose. The only functional difference is that the cancellation done from iscsi-command.c was (incorrectly) not checking for iscsi->is_loggedin before issuing callbacks. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
This commit is contained in:
@@ -284,6 +284,7 @@ void iscsi_pdu_set_itt(struct iscsi_pdu *pdu, uint32_t itt);
|
||||
void iscsi_pdu_set_ritt(struct iscsi_pdu *pdu, uint32_t ritt);
|
||||
void iscsi_pdu_set_datasn(struct iscsi_pdu *pdu, uint32_t datasn);
|
||||
void iscsi_pdu_set_bufferoffset(struct iscsi_pdu *pdu, uint32_t bufferoffset);
|
||||
void iscsi_cancel_pdus(struct iscsi_context *iscsi);
|
||||
int iscsi_pdu_add_data(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
||||
unsigned char *dptr, int dsize);
|
||||
int iscsi_queue_pdu(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
|
||||
|
||||
Reference in New Issue
Block a user