@@ -562,6 +562,7 @@ static int ceph_tcp_recvpage(struct socket *sock, struct page *page,
* write something. @more is true if caller will be sending more data
* shortly.
*/
+__attribute__((unused))
static int ceph_tcp_sendmsg(struct socket *sock, struct kvec *iov,
size_t kvlen, size_t len, bool more)
{
@@ -1552,13 +1553,14 @@ static int prepare_write_connect(struct ceph_connection *con)
*/
static int write_partial_kvec(struct ceph_connection *con)
{
+ struct iov_iter it;
int ret;
dout("write_partial_kvec %p %d left\n", con, con->out_kvec_bytes);
while (con->out_kvec_bytes > 0) {
- ret = ceph_tcp_sendmsg(con->sock, con->out_kvec_cur,
- con->out_kvec_left, con->out_kvec_bytes,
- con->out_more);
+ iov_iter_kvec(&it, WRITE, con->out_kvec_cur,
+ con->out_kvec_left, con->out_kvec_bytes);
+ ret = ceph_tcp_sendiov(con->sock, &it, con->out_more);
if (ret <= 0)
goto out;
con->out_kvec_bytes -= ret;
Signed-off-by: Roman Penyaev <rpenyaev@suse.de> --- net/ceph/messenger.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)