Whamcloud - gitweb
- remove debug stuff for b11150
authoryury <yury>
Sat, 4 Nov 2006 15:33:38 +0000 (15:33 +0000)
committeryury <yury>
Sat, 4 Nov 2006 15:33:38 +0000 (15:33 +0000)
lustre/cmm/cmm_object.c
lustre/cmm/cmm_split.c
lustre/cmm/mdc_object.c
lustre/lmv/lmv_obd.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_reint.c

index e3a7356..88aded5 100644 (file)
@@ -418,10 +418,11 @@ static int cml_create(const struct lu_env *env,
                         RETURN(rc);
                 }
         }
+        
         /* 
-         * Check for possible split directory and let caller know that
-         * it should tell client that directory is split and operation
-         * should repeat to correct MDT.
+         * Check for possible split directory and let caller know that it should
+         * tell client that directory is split and operation should repeat to
+         * correct MDT.
          */
         rc = cmm_split_check(env, mo_p, child_name);
         if (rc)
index 0a2cbef..bab0a16 100644 (file)
@@ -367,58 +367,6 @@ static inline int cmm_split_special_entry(struct lu_dirent *ent)
         return 0;
 }
 
-static void cmm_split_dump_entry(const struct lu_env *env,
-                                 struct md_object *mo,
-                                 struct lu_dirent *ent)
-{
-        struct cmm_device *cmm = cmm_obj2dev(md2cmm_obj(mo));
-        struct lu_fid *ef = &cmm_env_info(env)->cmi_fid;
-        struct cmm_object *obj;
-        int local;
-
-        fid_le_to_cpu(ef, &ent->lde_fid);
-        obj = cmm_object_find(env, cmm, ef);
-        if (IS_ERR(obj)) {
-                CERROR("Error while find object by "DFID
-                       ", rc %d\n", PFID(ef), (int)PTR_ERR(obj));
-                return;
-        }
-
-        local = (lu_object_exists(&obj->cmo_obj.mo_lu) > 0);
-
-        printk("%4.4x "DFID" %*.*s/%8.8x [%4.4x] (%s)\n",
-               le16_to_cpu(ent->lde_reclen), PFID(ef),
-               le16_to_cpu(ent->lde_namelen),
-               le16_to_cpu(ent->lde_namelen),
-               ent->lde_name, le32_to_cpu(ent->lde_hash),
-               le16_to_cpu(ent->lde_namelen),
-               (local ? "lc" : "cr"));
-
-        cmm_object_put(env, obj);
-}
-
-static void cmm_split_dump_page(const struct lu_env *env,
-                                struct md_object *mo,
-                                struct lu_dirpage *dp,
-                                __u32 hash_end)
-{
-        struct lu_dirent  *ent;
-
-        if (le16_to_cpu(dp->ldp_flags) & LDF_EMPTY)
-                return;
-
-        printk("Dump: page: [%8.8x-%8.8x]/[%8.8x], flags: "
-               "%4.4x\n", le32_to_cpu(dp->ldp_hash_start),
-               le32_to_cpu(dp->ldp_hash_end), hash_end,
-               le16_to_cpu(dp->ldp_flags));
-
-        for (ent = lu_dirent_start(dp);
-             ent != NULL && le32_to_cpu(ent->lde_hash) < hash_end;
-             ent = lu_dirent_next(ent)) {
-                cmm_split_dump_entry(env, mo, ent);
-        }
-}
-
 /*
  * Remove one entry from local MDT. Do not corrupt byte order in page, it will
  * be sent to remote MDT.
@@ -506,11 +454,10 @@ static int cmm_split_remove_page(const struct lu_env *env,
                          * currently we assumed it will success anyway in
                          * verfication test.
                          */
-                        CWARN("Can not del %*.*s, rc %d\n",
-                              le16_to_cpu(ent->lde_namelen),
-                              le16_to_cpu(ent->lde_namelen),
-                              ent->lde_name, rc);
-                        cmm_split_dump_page(env, mo, dp, hash_end);
+                        CERROR("Can not del %*.*s, rc %d\n",
+                               le16_to_cpu(ent->lde_namelen),
+                               le16_to_cpu(ent->lde_namelen),
+                               ent->lde_name, rc);
                         GOTO(unmap, rc);
                 }
                 *len += lu_dirent_size(ent);
@@ -634,7 +581,6 @@ static int cmm_split_process_dir(const struct lu_env *env,
         }
 
         LASSERT(ma->ma_valid & MA_LMV);
-        /* we need range of hashes, so MAX_HASH_SIZE + 1 */
         hash_segement = MAX_HASH_SIZE / (cmm->cmm_tgt_count + 1);
         for (i = 1; i < cmm->cmm_tgt_count + 1; i++) {
                 struct lu_fid *lf;
index 1c91a42..5168e0b 100644 (file)
@@ -247,11 +247,12 @@ static int mdc_object_create(const struct lu_env *env,
         __u32 cap;
         ENTRY;
 
-        LASSERT(spec->u.sp_pfid != NULL);
         LASSERT(S_ISDIR(la->la_mode));
+        LASSERT(spec->u.sp_pfid != NULL);
         mci = mdc_info_init(env);
         mci->mci_opdata.fid2 = *lu_object_fid(&mo->mo_lu);
-        /* parent fid is needed to create dotdot on the remote node */
+        
+        /* Parent fid is needed to create dotdot on the remote node. */
         mci->mci_opdata.fid1 = *(spec->u.sp_pfid);
         mci->mci_opdata.mod_time = la->la_mtime;
         if (uc &&
index 8885a14..0d6870f 100644 (file)
@@ -2057,7 +2057,7 @@ static int lmv_unlink(struct obd_export *exp, struct md_op_data *op_data,
                                                op_data->namelen);
                         op_data->fid1 = obj->lo_inodes[mea_idx].li_fid;
                         tgt_exp = lmv_get_export(lmv,
-                                        obj->lo_inodes[mea_idx].li_mds);
+                                                 obj->lo_inodes[mea_idx].li_mds);
                         lmv_obj_put(obj);
                         CDEBUG(D_OTHER, "unlink '%*s' in "DFID" -> %u\n",
                                op_data->namelen, op_data->name,
index e96dda8..fca738d 100644 (file)
@@ -1268,23 +1268,6 @@ static int mdd_dir_page_build(const struct lu_env *env, int first,
 
                 recsize = (sizeof(*ent) + len + 3) & ~3;
                 hash = iops->store(env, it);
-                if (ent != area) {
-                        /*
-                         * This is not first entry, *start is initialized so
-                         * that we can check hash for validness, that is, if it
-                         * fits into allowed range. It should not be smaller
-                         * than *start. Otherwise - iam iterator is buggy.
-                         */
-                        if (hash < *start) {
-                                CERROR("Entry hash (%#8.8x) < page hash (%#8.8x) - ["
-                                       "%p %p %d "DFID": %#8.8x (%d) \"%*.*s\"]\n",
-                                       hash, *start, name, ent, nob, PFID(fid2), hash,
-                                       len, len, len, name);
-                                result = iops->next(env, it);
-                                continue;
-                        }
-                }
-
                 *end = hash;
                 
                 CDEBUG(D_INFO, "%p %p %d "DFID": %#8.8x (%d) \"%*.*s\"\n",
index 4c7799a..524aebf 100644 (file)
@@ -317,7 +317,8 @@ static int mdt_reint_create(struct mdt_thread_info *info,
 
         switch (info->mti_attr.ma_attr.la_mode & S_IFMT) {
         case S_IFDIR:{
-                if (info->mti_rr.rr_name[0] == 0) {
+                /* Cross-ref case. */
+                if (info->mti_rr.rr_namelen == 1) {
                         rc = mdt_md_mkobj(info);
                         break;
                 }