From: Al Viro <viro@zeniv.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: Steve French <smfrench@gmail.com>,
Steve French <sfrench@samba.org>,
Shyam Prasad N <nspmangalore@gmail.com>,
Rohith Surabattula <rohiths.msft@gmail.com>,
linux-cifs@vger.kernel.org, Jeff Layton <jlayton@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] cifs: Add a function to read into an iter from a socket
Date: Sat, 24 Sep 2022 03:50:19 +0100 [thread overview]
Message-ID: <Yy5wa7MAmb7AkoPa@ZenIV> (raw)
In-Reply-To: <166126395495.708021.12328677373159554478.stgit@warthog.procyon.org.uk>
On Tue, Aug 23, 2022 at 03:12:34PM +0100, David Howells wrote:
> +int
> +cifs_read_iter_from_socket(struct TCP_Server_Info *server, struct iov_iter *iter,
> + unsigned int to_read)
> +{
> + struct msghdr smb_msg;
> + int ret;
> +
> + smb_msg.msg_iter = *iter;
> + if (smb_msg.msg_iter.count > to_read)
> + smb_msg.msg_iter.count = to_read;
ITYM
iov_iter_truncate(&smb_msg.msg_iter, to_read);
> + ret = cifs_readv_from_socket(server, &smb_msg);
> + if (ret > 0)
> + iov_iter_advance(iter, ret);
> + return ret;
> +}
> +
> static bool
> is_smb_response(struct TCP_Server_Info *server, unsigned char type)
> {
>
>
next prev parent reply other threads:[~2022-09-24 2:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 14:12 [PATCH 0/7] smb3: Add iter helpers and use iov_iters down to the network transport David Howells
2022-08-23 14:12 ` [PATCH 1/7] iov_iter: Add a function to extract an iter's buffers to a bvec iter David Howells
2022-08-24 3:52 ` Christoph Hellwig
2022-08-26 21:21 ` Al Viro
2022-10-14 14:06 ` David Howells
2022-08-23 14:12 ` [PATCH 2/7] iov_iter: Add a general purpose iteration function David Howells
2022-08-26 21:35 ` Al Viro
2022-08-23 14:12 ` [PATCH 3/7] cifs: Add some helper functions David Howells
2022-08-23 14:12 ` [PATCH 4/7] cifs: Add a function to read into an iter from a socket David Howells
2022-09-24 2:50 ` Al Viro [this message]
2022-08-23 14:12 ` [PATCH 5/7] cifs: Change the I/O paths to use an iterator rather than a page list David Howells
2022-09-24 4:34 ` Al Viro
2022-08-23 14:12 ` [PATCH 6/7] cifs: Remove unused code David Howells
2022-08-23 14:12 ` [PATCH 7/7] cifs: Add some RDMA send tracepoints David Howells
-- strict thread matches above, loose matches on Subject: below --
2022-05-25 14:26 [PATCH 0/7] cifs: Use iov_iters down to the network transport David Howells
2022-05-25 14:26 ` [PATCH 4/7] cifs: Add a function to read into an iter from a socket David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yy5wa7MAmb7AkoPa@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=rohiths.msft@gmail.com \
--cc=sfrench@samba.org \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).