#include <linux/err.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <obd.h>
#include <obd_class.h>
#include <obd_support.h>
* (MDT0)yet */
rc = seq_client_rpc(seq, &seq->lcs_space,
SEQ_ALLOC_META, "meta");
- if (rc == -EINPROGRESS || rc == -EAGAIN) {
- wait_queue_head_t waitq;
- struct l_wait_info lwi;
-
+ if (rc == -EINPROGRESS || rc == -EAGAIN)
/* MDT0 is not ready, let's wait for 2
* seconds and retry. */
- init_waitqueue_head(&waitq);
- lwi = LWI_TIMEOUT(cfs_time_seconds(2), NULL,
- NULL);
- l_wait_event(waitq, 0, &lwi);
- }
+ ssleep(2);
+
} while (rc == -EINPROGRESS || rc == -EAGAIN);
}
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/list.h>
+#include <linux/delay.h>
#include <lu_object.h>
#include <dt_object.h>
#include <md_object.h>
que->lu_mdts_count[i][LS_SCANNING_PHASE2] != 0 ||
que->lu_osts_count[i][LS_SCANNING_PHASE1] != 0 ||
que->lu_osts_count[i][LS_SCANNING_PHASE2] != 0) {
- struct l_wait_info lwi;
-
/* If it is required to wait, then sleep
- * 3 seconds and try to query again. */
- lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(3),
- NULL,
- LWI_ON_SIGNAL_NOOP,
- NULL);
- rc = l_wait_event(lfsck->li_thread.t_ctl_waitq,
- 0, &lwi);
- if (rc == -ETIMEDOUT)
+ * 3 seconds and try to query again.
+ */
+ unsigned long timeout =
+ msecs_to_jiffies(3000) + 1;
+ while (timeout &&
+ !fatal_signal_pending(current))
+ timeout = schedule_timeout_killable(
+ timeout);
+ if (timeout == 0)
goto again;
}
}
#include <linux/pagemap.h>
#include <linux/user_namespace.h>
#include <linux/utsname.h>
+#include <linux/delay.h>
#ifdef HAVE_UIDGID_HEADER
# include <linux/uidgid.h>
#endif
struct ptlrpc_request *req;
struct ptlrpc_bulk_desc *desc;
int i;
- wait_queue_head_t waitq;
int resends = 0;
- struct l_wait_info lwi;
int rc;
ENTRY;
*request = NULL;
- init_waitqueue_head(&waitq);
restart_bulk:
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_READPAGE);
exp->exp_obd->obd_name, -EIO);
RETURN(-EIO);
}
- lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(resends), NULL, NULL,
- NULL);
- l_wait_event(waitq, 0, &lwi);
+ ssleep(resends);
goto restart_bulk;
}
#include <libcfs/libcfs.h>
#include <linux/kernel.h>
+#include <linux/delay.h>
#include <obd_class.h>
#include <lustre_net.h>
#include <lustre_sec.h>
void ptlrpc_ni_fini(void)
{
- wait_queue_head_t waitq;
- struct l_wait_info lwi;
int rc;
int retries;
CWARN("Event queue still busy\n");
/* Wait for a bit */
- init_waitqueue_head(&waitq);
- lwi = LWI_TIMEOUT(cfs_time_seconds(2), NULL, NULL);
- l_wait_event(waitq, 0, &lwi);
+ ssleep(2);
break;
}
}
#define DEBUG_SUBSYSTEM S_CLASS
#include <linux/user_namespace.h>
+#include <linux/delay.h>
#ifdef HAVE_UIDGID_HEADER
# include <linux/uidgid.h>
#endif
* to reorder. */
if (unlikely(CFS_FAIL_PRECHECK(OBD_FAIL_PTLRPC_CLIENT_BULK_CB2)) &&
desc) {
- wait_queue_head_t waitq;
- struct l_wait_info lwi1;
-
CDEBUG(D_INFO, "reorder BULK\n");
- init_waitqueue_head(&waitq);
- lwi1 = LWI_TIMEOUT_INTR(cfs_time_seconds(3), NULL, NULL, NULL);
- l_wait_event(waitq, 0, &lwi1);
+ ssleep(3);
target_bulk_io(exp, desc);
ptlrpc_free_bulk(desc);
}