Whamcloud - gitweb
LU-1302 mgs: mgs uses llog over OSD
[fs/lustre-release.git] / lustre / obdclass / local_storage.c
index 9852dfd..1922804 100644 (file)
@@ -734,12 +734,22 @@ int local_oid_storage_init(const struct lu_env *env, struct dt_device *dev,
                rc = dt_record_write(env, o, &dti->dti_lb, &dti->dti_off, th);
                if (rc)
                        GOTO(out_trans, rc);
-               rc = dt_insert(env, root,
-                              (const struct dt_rec *)lu_object_fid(&o->do_lu),
-                              (const struct dt_key *)dti->dti_buf, th,
-                              BYPASS_CAPA, 1);
-               if (rc)
-                       GOTO(out_trans, rc);
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 3, 90, 0)
+#error "fix this before release"
+#endif
+               /*
+                * there is one technical debt left in Orion:
+                * proper hanlding of named vs no-name objects.
+                * Llog objects have name always as they are placed in O/d/...
+                */
+               if (fid_seq(lu_object_fid(&o->do_lu)) != FID_SEQ_LLOG) {
+                       rc = dt_insert(env, root,
+                                      (const struct dt_rec *)first_fid,
+                                      (const struct dt_key *)dti->dti_buf,
+                                      th, BYPASS_CAPA, 1);
+                       if (rc)
+                               GOTO(out_trans, rc);
+               }
 out_trans:
                dt_trans_stop(env, dev, th);
        } else {