All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: ceph-devel@vger.kernel.org
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH] libceph: Assign different global_id for each ceph_auth_client.
Date: Wed, 15 Aug 2012 17:23:31 +0800	[thread overview]
Message-ID: <1345022611-14080-1-git-send-email-zheng.z.yan@intel.com> (raw)

From: "Yan, Zheng" <zheng.z.yan@intel.com>

The global_id for ceph_auth_client is always zero. It prevents the
kernel from creating more than one ceph_clients that are connected
to the same cluster. (ceph_debugfs_client_init() fails to create
debugfs directory)

Without this patch, I can't using rbd and cephfs on the same machine.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 net/ceph/auth.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ceph/auth.c b/net/ceph/auth.c
index b4bf4ac..2b00d3a 100644
--- a/net/ceph/auth.c
+++ b/net/ceph/auth.c
@@ -12,6 +12,8 @@
 #include "auth_x.h"
 
 
+static u64 auth_global_id;
+
 /*
  * get protocol handler
  */
@@ -54,6 +56,7 @@ struct ceph_auth_client *ceph_auth_init(const char *name, const struct ceph_cryp
 		ac->name = CEPH_AUTH_NAME_DEFAULT;
 	dout("auth_init name %s\n", ac->name);
 	ac->key = key;
+	ac->global_id = ++auth_global_id;
 	return ac;
 
 out:
-- 
1.7.11.2


             reply	other threads:[~2012-08-15  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15  9:23 Yan, Zheng [this message]
2012-08-17 16:40 ` [PATCH] libceph: Assign different global_id for each ceph_auth_client Sage Weil

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=1345022611-14080-1-git-send-email-zheng.z.yan@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    /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.