* GPL HEADER END
*/
/*
- * Copyright (c) 2014, Intel Corporation.
+ * Copyright (c) 2015, 2016, Intel Corporation.
*/
/*
#define DEBUG_SUBSYSTEM S_CLASS
#include <lu_target.h>
-#include <md_object.h>
+#include <lustre_obdo.h>
#include <lustre_update.h>
+#include <lustre_swab.h>
+#include <md_object.h>
#include <obd.h>
#include <obd_class.h>
+
#include "tgt_internal.h"
/**
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;
* 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);
}
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;
}
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);
break;
}
next:
- lu_object_put(env, &dt_obj->do_lu);
+ dt_object_put(env, dt_obj);
if (rc < 0)
break;
}
rc = top_trans_stop(env, tdtd->tdtd_dt, th);
for (i = 0; i < ta->ta_argno; i++) {
if (ta->ta_args[i]->object != NULL) {
- lu_object_put(env, &ta->ta_args[i]->object->do_lu);
+ dt_object_put(env, ta->ta_args[i]->object);
ta->ta_args[i]->object = NULL;
}
}