Whamcloud - gitweb
b=17942
[fs/lustre-release.git] / lustre / cmm / cmm_object.c
index 3309687..bb5fd76 100644 (file)
@@ -66,12 +66,12 @@ int cmm_fld_lookup(struct cmm_device *cm, const struct lu_fid *fid,
         }
 
         if (*mds > cm->cmm_tgt_count) {
-                CERROR("Got invalid mdsno: "LPU64" (max: %u)\n",
+                CERROR("Got invalid mdsno: %x (max: %x)\n",
                        *mds, cm->cmm_tgt_count);
                 rc = -EINVAL;
         } else {
-                CDEBUG(D_INFO, "CMM: got MDS "LPU64" for sequence: "
-                       LPU64"\n", *mds, fid_seq(fid));
+                CDEBUG(D_INFO, "CMM: got MDS %x for sequence: "
+                       LPX64"\n", *mds, fid_seq(fid));
         }
 
         RETURN (rc);
@@ -345,6 +345,15 @@ static int cml_capa_get(const struct lu_env *env, struct md_object *mo,
         RETURN(rc);
 }
 
+static int cml_path(const struct lu_env *env, struct md_object *mo,
+                    char *path, int pathlen, __u64 recno, int *linkno)
+{
+        int rc;
+        ENTRY;
+        rc = mo_path(env, md_object_next(mo), path, pathlen, recno, linkno);
+        RETURN(rc);
+}
+
 static int cml_object_sync(const struct lu_env *env, struct md_object *mo)
 {
         int rc;
@@ -370,6 +379,7 @@ static const struct md_object_operations cml_mo_ops = {
         .moo_readlink      = cml_readlink,
         .moo_capa_get      = cml_capa_get,
         .moo_object_sync   = cml_object_sync,
+        .moo_path          = cml_path,
 };
 
 /* md_dir operations */
@@ -931,6 +941,12 @@ static int cmr_capa_get(const struct lu_env *env, struct md_object *mo,
         return -EFAULT;
 }
 
+static int cmr_path(const struct lu_env *env, struct md_object *obj,
+                    char *path, int pathlen, __u64 recno, int *linkno)
+{
+        return -EREMOTE;
+}
+
 static int cmr_object_sync(const struct lu_env *env, struct md_object *mo)
 {
         return -EFAULT;
@@ -953,6 +969,7 @@ static const struct md_object_operations cmr_mo_ops = {
         .moo_readlink      = cmr_readlink,
         .moo_capa_get      = cmr_capa_get,
         .moo_object_sync   = cmr_object_sync,
+        .moo_path          = cmr_path,
 };
 
 /* remote part of md_dir operations */
@@ -1274,5 +1291,5 @@ static const struct md_dir_operations cmr_dir_ops = {
         .mdo_link        = cmr_link,
         .mdo_unlink      = cmr_unlink,
         .mdo_rename      = cmr_rename,
-        .mdo_rename_tgt  = cmr_rename_tgt,
+        .mdo_rename_tgt  = cmr_rename_tgt
 };