From patchwork Wed Aug 15 09:23:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1324841 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 84E99DFFED for ; Wed, 15 Aug 2012 09:23:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579Ab2HOJXf (ORCPT ); Wed, 15 Aug 2012 05:23:35 -0400 Received: from mga14.intel.com ([143.182.124.37]:50805 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab2HOJXe (ORCPT ); Wed, 15 Aug 2012 05:23:34 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 15 Aug 2012 02:23:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.77,772,1336374000"; d="scan'208";a="134496553" Received: from zyan5-mobl.sh.intel.com ([10.239.36.77]) by AZSMGA002.ch.intel.com with ESMTP; 15 Aug 2012 02:23:32 -0700 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: "Yan, Zheng" Subject: [PATCH] libceph: Assign different global_id for each ceph_auth_client. Date: Wed, 15 Aug 2012 17:23:31 +0800 Message-Id: <1345022611-14080-1-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.2 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: "Yan, Zheng" 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 --- 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: