]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: disabling the readpage
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 7 Oct 2008 00:43:42 +0000 (17:43 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 7 Oct 2008 19:59:02 +0000 (12:59 -0700)
src/kernel/messenger.c

index 842665beeff80932587534df5626ee286c2eafc4..bb079948ec9d85c1ca2e28ba574efc1605241f88 100644 (file)
@@ -722,13 +722,16 @@ static int write_partial_msg_pages(struct ceph_connection *con,
 
                con->out_msg_pos.did_page_crc = 0;
 #endif
-               if (msg->pages)
+
 #ifndef CEPH_USE_SENDPAGE
-                       ret = ceph_tcp_sendmsg(con->sock, &kv, 1, kv.iov_len, 1);
-#endif
+               ret = ceph_tcp_sendmsg(con->sock, &kv, 1, kv.iov_len, 1);
+#else
+               if (msg->pages)
                        ret = kernel_sendpage(con->sock, page, con->out_msg_pos.page_pos, len, MSG_DONTWAIT | MSG_NOSIGNAL | MSG_MORE);
                else
                        ret = kernel_sendpage(con->sock, con->msgr->zero_page, con->out_msg_pos.page_pos, len, MSG_DONTWAIT | MSG_NOSIGNAL | MSG_MORE);
+#endif
+
 #ifndef CEPH_USE_SENDPAGE
                if (msg->pages)
                        kunmap(page);