From c3e03f36fe4e62a43d1b88bbce1bdc3a1b3ff2b0 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 26 Jan 2016 11:00:45 +0300 Subject: [PATCH] LU-7712 mdd: migration is too noisy 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 Reviewed-on: http://review.whamcloud.com/18145 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_dir.c | 3 ++- lustre/mdd/mdd_object.c | 5 +---- lustre/mdt/mdt_handler.c | 3 ++- lustre/mdt/mdt_reint.c | 16 +++++++++------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 8ab41e45..bb96d7c 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -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); diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 478eeb3..4163c85 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -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)) { diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index ab44bfd..f6b0e7a 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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); diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 461675c..5274339 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -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); -- 1.8.3.1