int rc;
ENTRY;
+ /* There will be some objects verification during the LFSCK start,
+ * such as the subsequent lfsck_verify_lpf(). Trigger low layer OI
+ * OI scrub before that to handle the potential inconsistence. */
+ oit_di = oit_iops->init(env, oit_obj, lfsck->li_args_oit);
+ if (IS_ERR(oit_di)) {
+ rc = PTR_ERR(oit_di);
+ CDEBUG(D_LFSCK, "%s: master engine fail to init iteration: "
+ "rc = %d\n", lfsck_lfsck2name(lfsck), rc);
+
+ GOTO(fini_args, rc);
+ }
+
if (lfsck->li_master &&
(!list_empty(&lfsck->li_list_scan) ||
!list_empty(&lfsck->li_list_double_scan))) {
lfsck_lfsck2name(lfsck), rc);
}
- oit_di = oit_iops->init(env, oit_obj, lfsck->li_args_oit);
- if (IS_ERR(oit_di)) {
- rc = PTR_ERR(oit_di);
- CDEBUG(D_LFSCK, "%s: master engine fail to init iteration: "
- "rc = %d\n", lfsck_lfsck2name(lfsck), rc);
-
- GOTO(fini_args, rc);
- }
-
spin_lock(&lfsck->li_lock);
lfsck->li_di_oit = oit_di;
spin_unlock(&lfsck->li_lock);