ostid_to_fid(fid, oi, idx);
update_lma = true;
}
+ } else if (!fid_is_norm(fid) && !fid_is_igif(fid) &&
+ !fid_is_last_id(fid) && !fid_is_root(fid) &&
+ !fid_seq_is_dot(fid_seq(fid))) {
+ /* If the FID/object is only used locally and invisible
+ * to external nodes, then LFSCK will not handle it. */
+ goto checkpoint;
}
target = lfsck_object_find(env, lfsck, fid);
struct dt_object *oit_obj = lfsck->li_obj_oit;
const struct dt_it_ops *oit_iops = &oit_obj->do_index_ops->dio_it;
struct dt_it *oit_di;
+ struct l_wait_info lwi = { 0 };
int rc;
ENTRY;
spin_lock(&lfsck->li_lock);
lfsck->li_di_oit = oit_di;
spin_unlock(&lfsck->li_lock);
- rc = lfsck_prep(env, lfsck);
+ rc = lfsck_prep(env, lfsck, lta->lta_lsp);
if (rc != 0)
GOTO(fini_oit, rc);
spin_unlock(&lfsck->li_lock);
wake_up_all(&thread->t_ctl_waitq);
+ l_wait_event(thread->t_ctl_waitq,
+ lfsck->li_start_unplug ||
+ !thread_is_running(thread),
+ &lwi);
+ if (!thread_is_running(thread))
+ GOTO(fini_oit, rc = 0);
+
if (!cfs_list_empty(&lfsck->li_list_scan) ||
cfs_list_empty(&lfsck->li_list_double_scan))
rc = lfsck_master_oit_engine(env, lfsck);
rc = lfsck_double_scan(env, lfsck);
else
rc = 0;
+ } else {
+ lfsck_quit(env, lfsck);
}
/* XXX: Purge the pinned objects in the future. */