cifs: Build the RDMA SGE list directly from an iterator
authorDavid Howells <dhowells@redhat.com>
Wed, 25 Jan 2023 13:34:38 +0000 (13:34 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 21 Feb 2023 00:36:02 +0000 (18:36 -0600)
commit3d78fe73fa123964be30f0acec449dc8a2241dae
tree345567ef8d7c80b6ed4acfe94fdcb50e06f98d58
parentd08089f649a0cfb2099c8551ac47eef0cc23fdf2
cifs: Build the RDMA SGE list directly from an iterator

In the depths of the cifs RDMA code, extract part of an iov iterator
directly into an SGE list without going through an intermediate
scatterlist.

Note that this doesn't support extraction from an IOBUF- or UBUF-type
iterator (ie. user-supplied buffer).  The assumption is that the higher
layers will extract those to a BVEC-type iterator first and do whatever is
required to stop the pages from going away.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Tom Talpey <tom@talpey.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: linux-rdma@vger.kernel.org

Link: https://lore.kernel.org/r/166697260361.61150.5064013393408112197.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/166732032518.3186319.1859601819981624629.stgit@warthog.procyon.org.uk/
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smbdirect.c
fs/cifs/smbdirect.h