Re: [PATCH 1/5] ceph: export ceph_create_session_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/30/21 8:17 PM, Ilya Dryomov wrote:
On Tue, Jun 29, 2021 at 3:27 PM Xiubo Li <xiubli@xxxxxxxxxx> wrote:

On 6/29/21 9:12 PM, Jeff Layton wrote:
On Tue, 2021-06-29 at 12:42 +0800, xiubli@xxxxxxxxxx wrote:
From: Xiubo Li <xiubli@xxxxxxxxxx>

nit: the subject of this patch is not quite right. You aren't exporting
it here, just making it a global symbol (within ceph.ko).

Yeah, will fix it.


Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
   fs/ceph/mds_client.c | 15 ++++++++-------
   fs/ceph/mds_client.h |  1 +
   2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 2d7dcd295bb9..e49d3e230712 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1150,7 +1150,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
   /*
    * session messages
    */
-static struct ceph_msg *create_session_msg(u32 op, u64 seq)
+struct ceph_msg *ceph_create_session_msg(u32 op, u64 seq)
   {
      struct ceph_msg *msg;
      struct ceph_mds_session_head *h;
@@ -1158,7 +1158,7 @@ static struct ceph_msg *create_session_msg(u32 op, u64 seq)
      msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h), GFP_NOFS,
                         false);
      if (!msg) {
-            pr_err("create_session_msg ENOMEM creating msg\n");
+            pr_err("ceph_create_session_msg ENOMEM creating msg\n");
instead of hardcoding the function names in these error messages, use
__func__ instead? That makes it easier to keep up with code changes.

       pr_err("%s ENOMEM creating msg\n", __func__);
Sure, will fix this too.
I think this can be just "ENOMEM creating session msg" without the
function name to avoid repetition.

Will fix it by using:

pr_err("ENOMEM creating session %s msg", ceph_session_op_name(op));

Thanks.


Thanks,

                 Ilya





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux