From patchwork Mon Feb 6 13:29:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 9557747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 404EB60236 for ; Mon, 6 Feb 2017 13:29:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2937B23E64 for ; Mon, 6 Feb 2017 13:29:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BF1E26E90; Mon, 6 Feb 2017 13:29:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1B9723E64 for ; Mon, 6 Feb 2017 13:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbdBFN3c (ORCPT ); Mon, 6 Feb 2017 08:29:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44686 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbdBFN3b (ORCPT ); Mon, 6 Feb 2017 08:29:31 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41A3C61E7C; Mon, 6 Feb 2017 13:29:32 +0000 (UTC) Received: from tleilax.poochiereds.net (ovpn-120-248.rdu2.redhat.com [10.10.120.248] (may be forged)) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v16DTTo5011646; Mon, 6 Feb 2017 08:29:31 -0500 From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: zyan@redhat.com, sage@redhat.com, idryomov@gmail.com, jspray@redhat.com Subject: [PATCH v2 3/6] libceph: rename and export have_pool_full Date: Mon, 6 Feb 2017 08:29:24 -0500 Message-Id: <20170206132927.9219-4-jlayton@redhat.com> In-Reply-To: <20170206132927.9219-1-jlayton@redhat.com> References: <20170206132927.9219-1-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 06 Feb 2017 13:29:32 +0000 (UTC) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cephfs needs to be able to call this as well. Rename have_pool_full to ceph_osdc_have_pool_full, and export it. Signed-off-by: Jeff Layton --- include/linux/ceph/osd_client.h | 1 + net/ceph/osd_client.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 34010c86b307..17bf1873bb01 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -313,6 +313,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc, extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg); void ceph_osdc_update_epoch_barrier(struct ceph_osd_client *osdc, u32 eb); +extern bool ceph_osdc_have_pool_full(struct ceph_osd_client *osdc); extern void osd_req_op_init(struct ceph_osd_request *osd_req, unsigned int which, u16 opcode, u32 flags); diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index aeee87a0e0da..d61d7a79fdb3 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1259,7 +1259,7 @@ static bool __pool_full(struct ceph_pg_pool_info *pi) return pi->flags & CEPH_POOL_FLAG_FULL; } -static bool have_pool_full(struct ceph_osd_client *osdc) +bool ceph_osdc_have_pool_full(struct ceph_osd_client *osdc) { struct rb_node *n; @@ -1273,6 +1273,7 @@ static bool have_pool_full(struct ceph_osd_client *osdc) return false; } +EXPORT_SYMBOL(ceph_osdc_have_pool_full); static bool pool_full(struct ceph_osd_client *osdc, s64 pool_id) { @@ -3271,7 +3272,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) was_pauserd = ceph_osdmap_flag(osdc, CEPH_OSDMAP_PAUSERD); was_pausewr = ceph_osdmap_flag(osdc, CEPH_OSDMAP_PAUSEWR) || ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL) || - have_pool_full(osdc); + ceph_osdc_have_pool_full(osdc); /* incremental maps */ ceph_decode_32_safe(&p, end, nr_maps, bad); @@ -3335,7 +3336,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) pauserd = ceph_osdmap_flag(osdc, CEPH_OSDMAP_PAUSERD); pausewr = ceph_osdmap_flag(osdc, CEPH_OSDMAP_PAUSEWR) || ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL) || - have_pool_full(osdc); + ceph_osdc_have_pool_full(osdc); if (was_pauserd || was_pausewr || pauserd || pausewr || (osdc->epoch_barrier && osdc->osdmap->epoch < osdc->epoch_barrier)) maybe_request_map(osdc);