Whamcloud - gitweb
LU-7712 mdd: migration is too noisy 45/18145/7
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Tue, 26 Jan 2016 08:00:45 +0000 (11:00 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 6 Aug 2016 06:25:28 +0000 (06:25 +0000)
even in the normal cases when we can't migrate a file due to
activity on it or missing file, etc.

Change-Id: Iee320963116cbb5a141bbeb358eb8f604aa6a533
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/18145
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_reint.c

index 8ab41e4..bb96d7c 100644 (file)
@@ -4217,7 +4217,8 @@ static int mdd_migrate(const struct lu_env *env, struct md_object *pobj,
         * the file is being opened by someone else right now */
        mdd_read_lock(env, mdd_sobj, MOR_SRC_CHILD);
        if (mdd_sobj->mod_count > 0) {
-               CERROR("%s: "DFID"%s is already opened count %d: rc = %d\n",
+               CDEBUG(D_OTHER,
+                      "%s: "DFID"%s is already opened count %d: rc = %d\n",
                       mdd2obd_dev(mdd)->obd_name,
                       PFID(mdd_object_fid(mdd_sobj)), lname->ln_name,
                       mdd_sobj->mod_count, -EBUSY);
index 478eeb3..4163c85 100644 (file)
@@ -67,11 +67,8 @@ int mdd_la_get(const struct lu_env *env, struct mdd_object *obj,
 {
        int rc;
 
-       if (mdd_object_exists(obj) == 0) {
-               CERROR("%s: object "DFID" not found: rc = -2\n",
-                      mdd_obj_dev_name(obj), PFID(mdd_object_fid(obj)));
+       if (mdd_object_exists(obj) == 0)
                return -ENOENT;
-       }
 
        rc = mdo_attr_get(env, obj, la);
        if (unlikely(rc != 0)) {
index ab44bfd..f6b0e7a 100644 (file)
@@ -1015,7 +1015,8 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
 
        rc = mdt_attr_get_complex(info, o, ma);
        if (unlikely(rc)) {
-               CERROR("%s: getattr error for "DFID": rc = %d\n",
+               CDEBUG(rc == -ENOENT ? D_OTHER : D_ERROR,
+                      "%s: getattr error for "DFID": rc = %d\n",
                       mdt_obd_name(info->mti_mdt),
                       PFID(mdt_object_fid(o)), rc);
                RETURN(rc);
index 461675c..5274339 100644 (file)
@@ -1528,7 +1528,7 @@ static int mdt_reint_migrate_internal(struct mdt_thread_info *info,
        /* 1: lock the source dir. */
        msrcdir = mdt_object_find(info->mti_env, info->mti_mdt, rr->rr_fid1);
        if (IS_ERR(msrcdir)) {
-               CERROR("%s: cannot find source dir "DFID" : rc = %d\n",
+               CDEBUG(D_OTHER, "%s: cannot find source dir "DFID" : rc = %d\n",
                        mdt_obd_name(info->mti_mdt), PFID(rr->rr_fid1),
                        (int)PTR_ERR(msrcdir));
                RETURN(PTR_ERR(msrcdir));
@@ -1567,14 +1567,14 @@ static int mdt_reint_migrate_internal(struct mdt_thread_info *info,
                GOTO(out_unlock_parent, rc = PTR_ERR(mold));
 
        if (mdt_object_remote(mold)) {
-               CERROR("%s: source "DFID" is on the remote MDT\n",
+               CDEBUG(D_OTHER, "%s: source "DFID" is on the remote MDT\n",
                       mdt_obd_name(info->mti_mdt), PFID(old_fid));
                GOTO(out_put_child, rc = -EREMOTE);
        }
 
        if (S_ISREG(lu_object_attr(&mold->mot_obj)) &&
            !mdt_object_remote(msrcdir)) {
-               CERROR("%s: parent "DFID" is still on the same"
+               CDEBUG(D_OTHER, "%s: parent "DFID" is still on the same"
                       " MDT, which should be migrated first:"
                       " rc = %d\n", mdt_obd_name(info->mti_mdt),
                       PFID(mdt_object_fid(msrcdir)), -EPERM);
@@ -1670,7 +1670,8 @@ out_lease:
 
        if ((ma->ma_valid & MA_HSM) && ma->ma_hsm.mh_flags != 0) {
                rc = -ENOSYS;
-               CERROR("%s: cannot migrate HSM archived file "DFID": rc = %d\n",
+               CDEBUG(D_OTHER,
+                      "%s: cannot migrate HSM archived file "DFID": rc = %d\n",
                       mdt_obd_name(info->mti_mdt), PFID(old_fid), rc);
                GOTO(out_unlock_child, rc);
        }
@@ -1689,7 +1690,7 @@ out_lease:
                lmv_le_to_cpu(ma->ma_lmv, ma->ma_lmv);
                lmm1 = &ma->ma_lmv->lmv_md_v1;
                if (!(lmm1->lmv_hash_type & LMV_HASH_FLAG_MIGRATION)) {
-                       CERROR("%s: can not migrate striped dir "DFID
+                       CDEBUG(D_OTHER, "%s: can not migrate striped dir "DFID
                               ": rc = %d\n", mdt_obd_name(info->mti_mdt),
                               PFID(mdt_object_fid(mold)), -EPERM);
                        GOTO(out_unlock_child, rc = -EPERM);
@@ -1704,7 +1705,8 @@ out_lease:
                        GOTO(out_unlock_child, rc = PTR_ERR(mnew));
 
                if (!mdt_object_remote(mnew)) {
-                       CERROR("%s: "DFID" being migrated is on this MDT:"
+                       CDEBUG(D_OTHER,
+                              "%s: "DFID" being migrated is on this MDT:"
                               " rc  = %d\n", mdt_obd_name(info->mti_mdt),
                               PFID(rr->rr_fid2), -EPERM);
                        GOTO(out_put_new, rc = -EPERM);
@@ -1727,7 +1729,7 @@ out_lease:
                if (IS_ERR(mnew))
                        GOTO(out_unlock_child, rc = PTR_ERR(mnew));
                if (!mdt_object_remote(mnew)) {
-                       CERROR("%s: Migration "DFID" is on this MDT:"
+                       CDEBUG(D_OTHER, "%s: Migration "DFID" is on this MDT:"
                               " rc = %d\n", mdt_obd_name(info->mti_mdt),
                               PFID(rr->rr_fid2), -EXDEV);
                        GOTO(out_put_new, rc = -EXDEV);