All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com
Subject: [PATCH 3/4] libceph: rename __ceph_osdc_alloc_messages to ceph_osdc_alloc_num_messages
Date: Wed,  1 Jul 2020 11:54:45 -0400	[thread overview]
Message-ID: <20200701155446.41141-4-jlayton@kernel.org> (raw)
In-Reply-To: <20200701155446.41141-1-jlayton@kernel.org>

...and make it public and export it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 include/linux/ceph/osd_client.h |  3 +++
 net/ceph/osd_client.c           | 13 +++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 40a08c4e5d8d..71b7610c3a3c 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -481,6 +481,9 @@ extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *
 					       unsigned int num_ops,
 					       bool use_mempool,
 					       gfp_t gfp_flags);
+int ceph_osdc_alloc_num_messages(struct ceph_osd_request *req, gfp_t gfp,
+				 int num_request_data_items,
+				 int num_reply_data_items);
 int ceph_osdc_alloc_messages(struct ceph_osd_request *req, gfp_t gfp);
 
 extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 4ddf23120b1a..7be78fa6e2c3 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -613,9 +613,9 @@ static int ceph_oloc_encoding_size(const struct ceph_object_locator *oloc)
 	return 8 + 4 + 4 + 4 + (oloc->pool_ns ? oloc->pool_ns->len : 0);
 }
 
-static int __ceph_osdc_alloc_messages(struct ceph_osd_request *req, gfp_t gfp,
-				      int num_request_data_items,
-				      int num_reply_data_items)
+int ceph_osdc_alloc_num_messages(struct ceph_osd_request *req, gfp_t gfp,
+				 int num_request_data_items,
+				 int num_reply_data_items)
 {
 	struct ceph_osd_client *osdc = req->r_osdc;
 	struct ceph_msg *msg;
@@ -672,6 +672,7 @@ static int __ceph_osdc_alloc_messages(struct ceph_osd_request *req, gfp_t gfp,
 
 	return 0;
 }
+EXPORT_SYMBOL(ceph_osdc_alloc_num_messages);
 
 static bool osd_req_opcode_valid(u16 opcode)
 {
@@ -738,8 +739,8 @@ int ceph_osdc_alloc_messages(struct ceph_osd_request *req, gfp_t gfp)
 	int num_request_data_items, num_reply_data_items;
 
 	get_num_data_items(req, &num_request_data_items, &num_reply_data_items);
-	return __ceph_osdc_alloc_messages(req, gfp, num_request_data_items,
-					  num_reply_data_items);
+	return ceph_osdc_alloc_num_messages(req, gfp, num_request_data_items,
+						  num_reply_data_items);
 }
 EXPORT_SYMBOL(ceph_osdc_alloc_messages);
 
@@ -1129,7 +1130,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
 		 * also covers ceph_uninline_data().  If more multi-op request
 		 * use cases emerge, we will need a separate helper.
 		 */
-		r = __ceph_osdc_alloc_messages(req, GFP_NOFS, num_ops, 0);
+		r = ceph_osdc_alloc_num_messages(req, GFP_NOFS, num_ops, 0);
 	else
 		r = ceph_osdc_alloc_messages(req, GFP_NOFS);
 	if (r)
-- 
2.26.2

  parent reply	other threads:[~2020-07-01 15:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 15:54 [PATCH 0/4] libceph/ceph: cleanups and move more into ceph.ko Jeff Layton
2020-07-01 15:54 ` [PATCH 1/4] libceph: just have osd_req_op_init return a pointer Jeff Layton
2020-07-06 16:41   ` Jeff Layton
2020-07-08 10:18     ` Ilya Dryomov
2020-07-01 15:54 ` [PATCH 2/4] libceph: refactor osdc request initialization Jeff Layton
2020-07-01 18:08   ` Ilya Dryomov
2020-07-01 18:24     ` Jeff Layton
2020-07-01 19:25       ` Ilya Dryomov
2020-07-01 15:54 ` Jeff Layton [this message]
2020-07-01 18:48   ` [PATCH 3/4] libceph: rename __ceph_osdc_alloc_messages to ceph_osdc_alloc_num_messages Ilya Dryomov
2020-07-01 19:17     ` Jeff Layton
2020-07-01 19:40       ` Ilya Dryomov
2020-07-01 19:51         ` Jeff Layton
2020-07-01 15:54 ` [PATCH 4/4] libceph/ceph: move ceph_osdc_new_request into ceph.ko Jeff Layton
2020-07-01 19:15   ` Ilya Dryomov
2020-07-01 19:22     ` Jeff Layton
2020-07-01 20:04       ` Ilya Dryomov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200701155446.41141-4-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.