Lines Matching defs:wait

536  * filemap_fdatawait_range - wait for writeback to complete
537 * @mapping: address space structure to wait for
542 * in the given range and wait for all of them. Check error status of
560 * filemap_fdatawait_range_keep_errors - wait for writeback to complete
561 * @mapping: address space structure to wait for
566 * given range and wait for all of them. Unlike filemap_fdatawait_range(),
582 * file_fdatawait_range - wait for writeback to complete
583 * @file: file pointing to address space structure to wait for
588 * refers to, in the given range and wait for all of them. Check error
607 * filemap_fdatawait_keep_errors - wait for writeback without clearing errors
608 * @mapping: address space structure to wait for
611 * and wait for all of them. Unlike filemap_fdatawait(), this function
637 * filemap_write_and_wait_range - write out & wait on a file range
642 * Write out and wait upon file offsets lstart->lend, inclusive.
659 * written partially (e.g. -ENOSPC), so we wait for it.
740 * file_write_and_wait_range - write out & wait on a file range
745 * Write out and wait upon file offsets lstart->lend, inclusive.
987 * In order to wait for pages to become available there must be
1016 * The page wait code treats the "wait->flags" somewhat unusually, because
1026 * and remove it from the wait queue.
1034 * WQ_FLAG_WOKEN bit, wake it up, and remove it from the wait queue.
1036 * This is the traditional exclusive wait.
1042 * cannot be taken, we stop walking the wait queue without waking
1049 static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg)
1054 = container_of(wait, struct wait_page_queue, wait);
1060 * If it's a lock handoff wait, we get the bit for it, and
1063 flags = wait->flags;
1075 * We are holding the wait-queue lock, but the waiter that
1083 smp_store_release(&wait->flags, flags | WQ_FLAG_WOKEN);
1084 wake_up_state(wait->private, mode);
1088 * and we can unconditionally remove the wait entry.
1092 * After this list_del_init(&wait->entry) the wait entry
1096 list_del_init_careful(&wait->entry);
1124 * from wait queue
1171 DROP, /* Drop ref to page before wait, no check when woken,
1181 struct wait_queue_entry *wait)
1183 if (wait->flags & WQ_FLAG_EXCLUSIVE) {
1189 wait->flags |= WQ_FLAG_WOKEN | WQ_FLAG_DONE;
1201 wait_queue_entry_t *wait = &wait_page.wait;
1216 init_wait(wait);
1217 wait->func = wake_page_function;
1222 wait->flags = 0;
1224 wait->flags = WQ_FLAG_EXCLUSIVE;
1226 wait->flags |= WQ_FLAG_CUSTOM;
1237 * page queue), and add ourselves to the wait
1245 if (!trylock_page_bit_common(page, bit_nr, wait))
1246 __add_wait_queue_entry_tail(q, wait);
1263 * be very careful with the 'wait->flags', because
1272 flags = smp_load_acquire(&wait->flags);
1298 wait->flags |= WQ_FLAG_DONE;
1304 * waiter from the wait-queues, but the PageWaiters bit will remain
1308 finish_wait(q, wait);
1317 * NOTE! The wait->flags weren't stable until we've done the
1330 return wait->flags & WQ_FLAG_DONE ? 0 : -EINTR;
1332 return wait->flags & WQ_FLAG_WOKEN ? 0 : -EINTR;
1350 struct wait_page_queue *wait, bool set)
1355 wait->page = page;
1356 wait->bit_nr = PG_locked;
1359 __add_wait_queue_entry_tail(q, &wait->wait);
1372 __remove_wait_queue(q, &wait->wait);
1380 struct wait_page_queue *wait)
1384 return __wait_on_page_locked_async(compound_head(page), wait, false);
1388 * put_and_wait_on_page_locked - Drop a reference and wait for it to be unlocked
1389 * @page: The page to wait for.
1407 * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue
1408 * @page: Page defining the wait queue of interest
1411 * Add an arbitrary @waiter to the wait queue for the nominated @page.
1493 * on truncation to wait for the clearing of PG_writeback.
1557 int __lock_page_async(struct page *page, struct wait_page_queue *wait)
1559 return __wait_on_page_locked_async(page, wait, true);
3064 * wait on the page to be unlocked and check if it's up to date and
3068 * wait on the same page for IO to complete.
3112 * not set, try to fill the page and wait for it to become unlocked.