iscsi: Handle unmapped I/O requests.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 10 Mar 2022 23:49:53 +0000 (15:49 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 10 Mar 2022 23:49:53 +0000 (15:49 -0800)
commit7aab9c14a462e0871394bbc4e276affb79c8d173
treec1788760cd733e6e272aea9bbf554be9a5271c91
parentc6a43f7f10b183469c3804cfb31b29b6d938621b
iscsi: Handle unmapped I/O requests.

Don't assume that csio->data_ptr is pointer to a data buffer that can
be passed to icl_get_pdu_data and icl_append_data.  For unmapped I/O
requests, csio->data_ptr is instead a pointer to a struct bio as
indicated by CAM_DATA_BIO.  To support these requests, add
icl_pdu_append_bio and icl_pdu_get_bio methods which pass a pointer to
the bio and an offset and length relative to the bio's buffer.

Note that only backends supporting unmapped requests need to implement
these hooks.

Implement simple no-op hooks for the iser backend.

Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D34382
sys/dev/iscsi/icl_conn_if.m
sys/dev/iscsi/icl_wrappers.h
sys/dev/iscsi/iscsi.c
sys/dev/iser/icl_iser.c