From patchwork Sat Mar 9 15:14:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2241701 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 593B0DF2F2 for ; Sat, 9 Mar 2013 15:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932429Ab3CIPOL (ORCPT ); Sat, 9 Mar 2013 10:14:11 -0500 Received: from mail-ie0-f179.google.com ([209.85.223.179]:52596 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932288Ab3CIPOL (ORCPT ); Sat, 9 Mar 2013 10:14:11 -0500 Received: by mail-ie0-f179.google.com with SMTP id k11so3166766iea.38 for ; Sat, 09 Mar 2013 07:14:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=cD6xlLcRzDa6Ri8sfFR1bzGt2QgFJ2i00KdEuLJOFdY=; b=NqzZQi9D35P/fWndQwtAUYcTPKFvl80P4mfQnopeyqYLwxYHsbPBo8OjoGSd4FRVv8 fC2g0IFwphDjtw2W8xX9e0NTnblMhvf8eaoujqG8yaz2Ae3k7FbasfU2vo3r3tBSxIkA 5qL520YRVRcVKCIQijfQUJmE6z6L8dvdDyceVLg3FCZac8Ix7nZoJ8g2w8YxvjnaP2my Ne116UOiaClUHw5wz/4kjiDqZ9LoUd/tonaqu65yY95FPvqgQbILjeuhYcHoRjFYSdgM KWv9dIzKW3RNmZrbD41T20hhUwgRlri82r3iDzLUerzxuy94necoJkJ6QprEHvLrVQQ8 C/CQ== X-Received: by 10.50.151.179 with SMTP id ur19mr2463217igb.79.1362842050582; Sat, 09 Mar 2013 07:14:10 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id hi4sm4537860igc.6.2013.03.09.07.14.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Mar 2013 07:14:09 -0800 (PST) Message-ID: <513B51C0.8020409@inktank.com> Date: Sat, 09 Mar 2013 09:14:08 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 3/8] libceph: change type of ceph_tcp_sendpage() "more" References: <513B5116.2020305@inktank.com> In-Reply-To: <513B5116.2020305@inktank.com> X-Gm-Message-State: ALoCoQkj4ceMJwq1MZaroJClatsY7pM94ni5/DKm3LtRwoHNJBAYrecRrqcc6sXbMY256zkKgF5w Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Change the type of the "more" parameter from int to bool. Signed-off-by: Alex Elder --- net/ceph/messenger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) int ret; @@ -1132,7 +1132,7 @@ static int write_partial_msg_pages(struct ceph_connection *con) } ret = ceph_tcp_sendpage(con->sock, page, con->out_msg_pos.page_pos + bio_offset, - len, 1); + len, true); if (ret <= 0) goto out; @@ -1161,7 +1161,7 @@ static int write_partial_skip(struct ceph_connection *con) while (con->out_skip > 0) { size_t size = min(con->out_skip, (int) PAGE_CACHE_SIZE); - ret = ceph_tcp_sendpage(con->sock, zero_page, 0, size, 1); + ret = ceph_tcp_sendpage(con->sock, zero_page, 0, size, true); if (ret <= 0) goto out; con->out_skip -= ret; diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index d9ace97..962b2cd 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -493,7 +493,7 @@ static int ceph_tcp_sendmsg(struct socket *sock, struct kvec *iov, } static int ceph_tcp_sendpage(struct socket *sock, struct page *page, - int offset, size_t size, int more) + int offset, size_t size, bool more) { int flags = MSG_DONTWAIT | MSG_NOSIGNAL | (more ? MSG_MORE : MSG_EOR);