Lines Matching defs:sock
122 static void ceph_data_ready(struct sock *sk, int count_unused)
134 static void ceph_write_space(struct sock *sk)
152 static void ceph_state_change(struct sock *sk)
186 static void set_sock_callbacks(struct socket *sock,
189 struct sock *sk = sock->sk;
207 struct socket *sock;
210 BUG_ON(con->sock);
212 IPPROTO_TCP, &sock);
215 con->sock = sock;
216 sock->sk->sk_allocation = GFP_NOFS;
219 lockdep_set_class(&sock->sk->sk_lock, &socket_class);
222 set_sock_callbacks(sock, con);
226 ret = sock->ops->connect(sock, (struct sockaddr *)paddr, sizeof(*paddr),
231 sock->sk->sk_state);
237 sock_release(sock);
238 con->sock = NULL;
244 return sock;
247 static int ceph_tcp_recvmsg(struct socket *sock, void *buf, size_t len)
252 return kernel_recvmsg(sock, &msg, &iov, 1, len, msg.msg_flags);
259 static int ceph_tcp_sendmsg(struct socket *sock, struct kvec *iov,
269 return kernel_sendmsg(sock, &msg, iov, kvlen, len);
280 dout("con_close_socket on %p sock %p\n", con, con->sock);
281 if (!con->sock)
284 rc = con->sock->ops->shutdown(con->sock, SHUT_RDWR);
285 sock_release(con->sock);
286 con->sock = NULL;
390 BUG_ON(con->sock);
685 ret = ceph_tcp_sendmsg(con->sock, con->out_kvec_cur,
769 ret = kernel_sendpage(con->sock, page,
819 ret = ceph_tcp_sendmsg(con->sock, &iov, 1, iov.iov_len, 1);
877 int ret = ceph_tcp_recvmsg(con->sock, object + have, left);
1316 ret = ceph_tcp_recvmsg(con->sock, (char *)section->iov_base +
1351 ret = ceph_tcp_recvmsg(con->sock,
1450 ret = ceph_tcp_recvmsg(con->sock, p + con->in_msg_pos.page_pos,
1471 ret = ceph_tcp_recvmsg(con->sock, (char *)&m->footer +
1554 if (con->sock == NULL) {
1573 con->sock = ceph_tcp_connect(con);
1574 if (IS_ERR(con->sock)) {
1575 con->sock = NULL;
1655 if (!con->sock)
1691 ret = ceph_tcp_recvmsg(con->sock, buf, skip);
1702 ret = ceph_tcp_recvmsg(con->sock, &con->in_tag, 1);