X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftarget%2Fupdate_recovery.c;h=766230c76ad73efe8593ca6da91cf885612b018d;hb=b38eb0b6c483e40a6112d02cffeed53c3ee5a743;hp=c4282e9dbbb05338579d2091b6aa6ace38cd2541;hpb=0754bc8f2623bea184111af216f7567608db35b6;p=fs%2Flustre-release.git diff --git a/lustre/target/update_recovery.c b/lustre/target/update_recovery.c index c4282e9..766230c 100644 --- a/lustre/target/update_recovery.c +++ b/lustre/target/update_recovery.c @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2014, 2015, Intel Corporation. + * Copyright (c) 2015, 2016, Intel Corporation. */ /* @@ -44,10 +44,13 @@ #define DEBUG_SUBSYSTEM S_CLASS #include -#include +#include #include +#include +#include #include #include + #include "tgt_internal.h" /** @@ -378,14 +381,14 @@ insert_update_records_to_replay_list(struct target_distribute_txn_data *tdtd, int rc = 0; ENTRY; - CDEBUG(D_HA, "%s: insert record batchid = "LPU64" transno = "LPU64 + CDEBUG(D_HA, "%s: insert record batchid = %llu transno = %llu" " mdt_index %u\n", tdtd->tdtd_lut->lut_obd->obd_name, record->ur_batchid, record->ur_master_transno, mdt_index); /* Update batchid if necessary */ spin_lock(&tdtd->tdtd_batchid_lock); if (record->ur_batchid >= tdtd->tdtd_batchid) { - CDEBUG(D_HA, "%s update batchid from "LPU64 " to "LPU64"\n", + CDEBUG(D_HA, "%s update batchid from %llu" " to %llu\n", tdtd->tdtd_lut->lut_obd->obd_name, tdtd->tdtd_batchid, record->ur_batchid); tdtd->tdtd_batchid = record->ur_batchid + 1; @@ -442,7 +445,7 @@ again: * we do not need lock here */ if (replace_record) { /* Replace the update record and master transno */ - OBD_FREE(dtrq->dtrq_lur, dtrq->dtrq_lur_size); + OBD_FREE_LARGE(dtrq->dtrq_lur, dtrq->dtrq_lur_size); dtrq->dtrq_lur = NULL; dtrq->dtrq_lur_size = llog_update_record_size(lur); OBD_ALLOC_LARGE(dtrq->dtrq_lur, dtrq->dtrq_lur_size); @@ -596,7 +599,7 @@ __u64 distribute_txn_get_next_transno(struct target_distribute_txn_data *tdtd) } spin_unlock(&tdtd->tdtd_replay_list_lock); - CDEBUG(D_HA, "%s: Next update transno "LPU64"\n", + CDEBUG(D_HA, "%s: Next update transno %llu\n", tdtd->tdtd_lut->lut_obd->obd_name, transno); return transno; } @@ -1164,6 +1167,17 @@ static int update_recovery_exec(const struct lu_env *env, dt_obj = dt_locate(env, tdtd->tdtd_dt, fid); if (IS_ERR(dt_obj)) { rc = PTR_ERR(dt_obj); + if (rc == -EREMCHG) + LCONSOLE_WARN("%.16s: hit invalid OI mapping " + "for "DFID" during recovering, " + "that may because auto scrub is " + "disabled on related MDT, and " + "will cause recovery failure. " + "Please enable auto scrub and " + "retry the recovery.\n", + tdtd->tdtd_lut->lut_obd->obd_name, + PFID(fid)); + break; } sub_dt_obj = dt_object_child(dt_obj);