diff options
author | David Howells <dhowells@redhat.com> | 2022-11-01 15:52:47 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-02-21 00:25:43 +0100 |
commit | 4e260a8fd740aa0dcecafe79c4f9d3013a21f1ca (patch) | |
tree | e9f87533b77133aa0c1476a8abfa3fd804820f95 /fs/cifs/cifs_spnego_negtokeninit.asn1 | |
parent | splice: Export filemap/direct_splice_read() (diff) | |
download | linux-4e260a8fd740aa0dcecafe79c4f9d3013a21f1ca.tar.xz linux-4e260a8fd740aa0dcecafe79c4f9d3013a21f1ca.zip |
cifs: Implement splice_read to pass down ITER_BVEC not ITER_PIPE
Provide cifs_splice_read() to use a bvec rather than an pipe iterator as
the latter cannot so easily be split and advanced, which is necessary to
pass an iterator down to the bottom levels. Upstream cifs gets around this
problem by using iov_iter_get_pages() to prefill the pipe and then passing
the list of pages down.
This is done by:
(1) Bulk-allocate a bunch of pages to carry as much of the requested
amount of data as possible, but without overrunning the available
slots in the pipe and add them to an ITER_BVEC.
(2) Synchronously call ->read_iter() to read into the buffer.
(3) Discard any unused pages.
(4) Load the remaining pages into the pipe in order and advance the head
pointer.
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: Jeff Layton <jlayton@kernel.org>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: linux-cifs@vger.kernel.org
Link: https://lore.kernel.org/r/166732028113.3186319.1793644937097301358.stgit@warthog.procyon.org.uk/ # rfc
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifs_spnego_negtokeninit.asn1')
0 files changed, 0 insertions, 0 deletions