Whamcloud - gitweb
LU-13004 ptlrpc: Allow BULK_BUF_KIOV to accept a kvec 24/36824/7
authorMr NeilBrown <neilb@suse.com>
Sun, 5 Jan 2020 16:11:30 +0000 (11:11 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Jan 2020 04:04:35 +0000 (04:04 +0000)
commit917655fc2938b90a9c246dd2d58408c42aa1658d
tree4738fb39178473eaab658e4cf8a19cefd99bd857
parent4b0f0164c6ed761897409186376e9edc989323c9
LU-13004 ptlrpc: Allow BULK_BUF_KIOV to accept a kvec

Bulk descriptor of type PTLRPC_BULK_BUF_KIOV are comprised
of a list of page+offset+len.
If the calling code actually has a virtual-address+len, it
cannot current use BULK_BUF_KIOV and must use BULK_BUF_KVEC.

However it is quite easy to convert virtual-address+len
to a list of page+offset+len.

So we can add a ->add_iov_frag interface for KIOV descriptors, and
then we will be able to use KIOV descriptors for everything.  The
caller must ensure to allocate a large enough descriptor, taking
into account the size of each exptected kvec.

Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: If8bc5dc9f6e89a196bd72d3ac9b88c4ea5da83d1
Reviewed-on: https://review.whamcloud.com/36824
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/client.c