Whamcloud - gitweb
LU-3159 lprocfs: fix LDLM namespace names in /proc
authorJian Yu <jian.yu@intel.com>
Fri, 12 Apr 2013 10:23:33 +0000 (18:23 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 16 Apr 2013 16:31:57 +0000 (12:31 -0400)
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 <jian.yu@intel.com>
Change-Id: Ieb3ef6c48d1f52f8d238bb64b7ce9ea004d2964f
Reviewed-on: http://review.whamcloud.com/6039
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/mdt/mdt_handler.c
lustre/ofd/ofd_dev.c

index 1a0d670..fe38cb5 100644 (file)
@@ -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,
index 7243c12..3ffba91 100644 (file)
@@ -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,