+static int lfsck_namespace_double_scan(const struct lu_env *env,
+ struct lfsck_component *com)
+{
+ struct lfsck_instance *lfsck = com->lc_lfsck;
+ struct lfsck_namespace *ns = com->lc_file_ram;
+ struct lfsck_thread_args *lta;
+ struct task_struct *task;
+ int rc;
+ ENTRY;
+
+ if (unlikely(ns->ln_status != LS_SCANNING_PHASE2))
+ RETURN(0);
+
+ lta = lfsck_thread_args_init(lfsck, com, NULL);
+ if (IS_ERR(lta))
+ GOTO(out, rc = PTR_ERR(lta));
+
+ atomic_inc(&lfsck->li_double_scan_count);
+ task = kthread_run(lfsck_namespace_double_scan_main, lta,
+ "lfsck_namespace");
+ if (IS_ERR(task)) {
+ atomic_dec(&lfsck->li_double_scan_count);
+ lfsck_thread_args_fini(lta);
+ GOTO(out, rc = PTR_ERR(task));
+ }
+
+ RETURN(0);
+
+out:
+ CERROR("%s: cannot start LFSCK namespace thread: rc = %d\n",
+ lfsck_lfsck2name(lfsck), rc);
+ return rc;
+}
+
+static int lfsck_namespace_in_notify(const struct lu_env *env,
+ struct lfsck_component *com,
+ struct lfsck_request *lr)
+{
+ return 0;
+}
+
+static int lfsck_namespace_query(const struct lu_env *env,
+ struct lfsck_component *com)
+{
+ struct lfsck_namespace *ns = com->lc_file_ram;
+
+ return ns->ln_status;
+}
+