- lsp.lsp_namespace = ofd->ofd_namespace;
- lsp.lsp_start = NULL;
- lsp.lsp_index_valid = 0;
- rc = lfsck_start(env, ofd->ofd_osd, &lsp);
- if (rc != 0) {
- CWARN("%s: auto trigger paused LFSCK failed: rc = %d\n",
- obd->obd_name, rc);
- rc = 0;
- }
+ rc = lfsck_register_namespace(env, ofd->ofd_osd, ofd->ofd_namespace);
+ /* The LFSCK instance is registered just now, so it must be there when
+ * register the namespace to such instance. */
+ LASSERTF(rc == 0, "register namespace failed: rc = %d\n", rc);