Lines Matching refs:waiter

191  * Will notify the operation waiter if there is one. This method should be used for operations
203 if (state->waiter != NULL)
204 vdo_set_completion_result(state->waiter, result);
208 if (state->waiter != NULL)
209 vdo_launch_completion(vdo_forget(state->waiter));
217 * @waiter A completion to notify when the operation is complete; may be NULL.
224 struct vdo_completion *waiter,
235 } else if (state->waiter != NULL) {
237 "Can't start %s with extant waiter",
240 state->waiter = waiter;
254 if (waiter != NULL)
255 vdo_continue_completion(waiter, result);
262 * @waiter A completion to notify when the operation is complete.
269 struct vdo_completion *waiter,
272 return (begin_operation(state, operation, waiter, initiator) == VDO_SUCCESS);
280 * @waiter The completion to notify of the error; may be NULL.
282 * If the result failed, log an invalid state error and, if there is a waiter, notify it.
287 struct vdo_completion *waiter)
296 if (waiter != NULL)
297 vdo_continue_completion(waiter, result);
304 * @waiter The completion to finish with an error if the operation is not a drain.
309 struct vdo_completion *waiter)
311 return check_code(operation->draining, operation, "drain operation", waiter);
317 * @waiter The completion to notify when the drain is complete.
320 * Return: true if the drain was initiated, if not the waiter will be notified.
324 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator)
328 if (!assert_vdo_drain_operation(operation, waiter))
332 vdo_launch_completion(waiter);
339 vdo_continue_completion(waiter, VDO_INVALID_ADMIN_STATE);
343 return start_operation(state, operation, waiter, initiator);
349 * Return: true if the state was draining; will notify the waiter if so.
359 * Return: true if the state was draining; will notify the waiter if so.
368 * @waiter The completion to finish with an error if the operation is not a load.
373 struct vdo_completion *waiter)
375 return check_code(operation->loading, operation, "load operation", waiter);
381 * @waiter The completion to notify when the load is complete (may be NULL).
384 * Return: true if the load was initiated, if not the waiter will be notified.
388 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator)
390 return (vdo_assert_load_operation(operation, waiter) &&
391 start_operation(state, operation, waiter, initiator));
397 * Return: true if the state was loading; will notify the waiter if so.
408 * Return: true if the state was loading; will notify the waiter if so.
417 * @waiter The completion to notify if the operation is not a resume operation; may be NULL.
422 struct vdo_completion *waiter)
425 "resume operation", waiter);
431 * @waiter The completion to notify when the resume is complete (may be NULL).
434 * Return: true if the resume was initiated, if not the waiter will be notified.
438 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator)
440 return (assert_vdo_resume_operation(operation, waiter) &&
441 start_operation(state, operation, waiter, initiator));
447 * Return: true if the state was resuming; will notify the waiter if so.
458 * Return: true if the state was resuming; will notify the waiter if so.
493 * @waiter the completion to notify when the operation completes or fails to start; may be NULL.
500 struct vdo_completion *waiter,
503 return (check_code(operation->operating, operation, "operation", waiter) ?
504 begin_operation(state, operation, waiter, initiator) :