From 53d4286bc0f08f4d614c81842fbfdfb6a2f438bd Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 12 Apr 2013 18:23:33 +0800 Subject: [PATCH] LU-3159 lprocfs: fix LDLM namespace names in /proc This patch fixes LDLM namespace names in /proc/fs/lustre/ldlm/namespaces/ to use obd->obd_uuid.uuid instead of a pointer address. Signed-off-by: Jian Yu Change-Id: Ieb3ef6c48d1f52f8d238bb64b7ce9ea004d2964f Reviewed-on: http://review.whamcloud.com/6039 Reviewed-by: Bob Glossman Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo --- lustre/mdt/mdt_handler.c | 4 ++-- lustre/ofd/ofd_dev.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 1a0d670..fe38cb5 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4740,8 +4740,8 @@ static int mdt_init0(const struct lu_env *env, struct mdt_device *m, if (rc) GOTO(err_fini_fld, rc); - snprintf(info->mti_u.ns_name, sizeof info->mti_u.ns_name, - LUSTRE_MDT_NAME"-%p", m); + snprintf(info->mti_u.ns_name, sizeof(info->mti_u.ns_name), "%s-%s", + LUSTRE_MDT_NAME, obd->obd_uuid.uuid); m->mdt_namespace = ldlm_namespace_new(obd, info->mti_u.ns_name, LDLM_NAMESPACE_SERVER, LDLM_NAMESPACE_GREEDY, diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 7243c12..3ffba91 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -680,7 +680,8 @@ static int ofd_init0(const struct lu_env *env, struct ofd_device *m, if (osfs->os_bsize * osfs->os_blocks < OFD_PRECREATE_SMALL_FS) m->ofd_precreate_batch = OFD_PRECREATE_BATCH_SMALL; - snprintf(info->fti_u.name, sizeof(info->fti_u.name), "filter-%p", m); + snprintf(info->fti_u.name, sizeof(info->fti_u.name), "%s-%s", + "filter"/*LUSTRE_OST_NAME*/, obd->obd_uuid.uuid); m->ofd_namespace = ldlm_namespace_new(obd, info->fti_u.name, LDLM_NAMESPACE_SERVER, LDLM_NAMESPACE_GREEDY, -- 1.8.3.1