+static cfs_wait_handler_t wait_handler;
+
+void cfs_init_completion_module(cfs_wait_handler_t handler)
+{
+ wait_handler = handler;
+}
+
+int cfs_call_wait_handler(int timeout)
+{
+ if (!wait_handler)
+ return -ENOSYS;
+ return wait_handler(timeout);
+}
+
+void cfs_init_completion(cfs_completion_t *c)
+{
+ LASSERT(c != NULL);
+ c->done = 0;
+ cfs_waitq_init(&c->wait);
+}
+
+void cfs_complete(cfs_completion_t *c)