+ /* If orphans are being recovered, then we must wait until it is
+ finished before we can continue with create. */
+ if (oscc_recovering(oscc)) {
+ struct l_wait_info lwi;
+
+ CDEBUG(D_HA, "%p: oscc recovery in progress, waiting\n", oscc);
+
+ lwi = LWI_TIMEOUT(MAX(obd_timeout * HZ, 1), NULL, NULL);
+ rc = l_wait_event(oscc->oscc_waitq, !oscc_recovering(oscc),
+ &lwi);
+ LASSERT(rc == 0 || rc == -ETIMEDOUT);
+ if (rc == -ETIMEDOUT)
+ RETURN(rc);
+ CDEBUG(D_HA, "%p: oscc recovery over, waking up\n", oscc);
+ }
+
+