Lines Matching full:monitor
23 struct cachefiles_one_read *monitor = in cachefiles_read_waiter() local
24 container_of(wait, struct cachefiles_one_read, monitor); in cachefiles_read_waiter()
26 struct fscache_retrieval *op = monitor->op; in cachefiles_read_waiter()
33 monitor->netfs_page->index, mode, sync, in cachefiles_read_waiter()
40 _debug("--- monitor %p %lx ---", page, page->flags); in cachefiles_read_waiter()
55 * monitor being enqueued on the op->to_do list and the op getting in cachefiles_read_waiter()
62 list_add_tail(&monitor->op_link, &op->to_do); in cachefiles_read_waiter()
78 struct cachefiles_one_read *monitor) in cachefiles_read_reissue() argument
81 struct page *backpage = monitor->back_page, *backpage2; in cachefiles_read_reissue()
110 INIT_LIST_HEAD(&monitor->op_link); in cachefiles_read_reissue()
111 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_reissue()
127 /* but the page may have been read before the monitor was installed, so in cachefiles_read_reissue()
128 * the monitor may miss the event - so we have to ensure that we do get in cachefiles_read_reissue()
143 list_del(&monitor->op_link); in cachefiles_read_reissue()
155 struct cachefiles_one_read *monitor; in cachefiles_read_copier() local
170 monitor = list_entry(op->to_do.next, in cachefiles_read_copier()
172 list_del(&monitor->op_link); in cachefiles_read_copier()
176 _debug("- copy {%lu}", monitor->back_page->index); in cachefiles_read_copier()
182 } else if (PageUptodate(monitor->back_page)) { in cachefiles_read_copier()
183 copy_highpage(monitor->netfs_page, monitor->back_page); in cachefiles_read_copier()
184 fscache_mark_page_cached(monitor->op, in cachefiles_read_copier()
185 monitor->netfs_page); in cachefiles_read_copier()
187 } else if (!PageError(monitor->back_page)) { in cachefiles_read_copier()
189 error = cachefiles_read_reissue(object, monitor); in cachefiles_read_copier()
197 (unsigned long) monitor->back_page->flags); in cachefiles_read_copier()
201 put_page(monitor->back_page); in cachefiles_read_copier()
203 fscache_end_io(op, monitor->netfs_page, error); in cachefiles_read_copier()
204 put_page(monitor->netfs_page); in cachefiles_read_copier()
207 kfree(monitor); in cachefiles_read_copier()
234 struct cachefiles_one_read *monitor; in cachefiles_read_backing_file_one() local
244 monitor = kzalloc(sizeof(*monitor), cachefiles_gfp); in cachefiles_read_backing_file_one()
245 if (!monitor) in cachefiles_read_backing_file_one()
248 monitor->netfs_page = netpage; in cachefiles_read_backing_file_one()
249 monitor->op = fscache_get_retrieval(op); in cachefiles_read_backing_file_one()
251 init_waitqueue_func_entry(&monitor->monitor, cachefiles_read_waiter); in cachefiles_read_backing_file_one()
289 /* set the monitor to transfer the data across */ in cachefiles_read_backing_file_one()
291 _debug("- monitor add"); in cachefiles_read_backing_file_one()
293 /* install the monitor */ in cachefiles_read_backing_file_one()
294 get_page(monitor->netfs_page); in cachefiles_read_backing_file_one()
296 monitor->back_page = backpage; in cachefiles_read_backing_file_one()
297 monitor->monitor.private = backpage; in cachefiles_read_backing_file_one()
298 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_backing_file_one()
299 monitor = NULL; in cachefiles_read_backing_file_one()
301 /* but the page may have been read before the monitor was installed, so in cachefiles_read_backing_file_one()
302 * the monitor may miss the event - so we have to ensure that we do get in cachefiles_read_backing_file_one()
349 if (monitor) { in cachefiles_read_backing_file_one()
350 fscache_put_retrieval(monitor->op); in cachefiles_read_backing_file_one()
351 kfree(monitor); in cachefiles_read_backing_file_one()
371 fscache_put_retrieval(monitor->op); in cachefiles_read_backing_file_one()
372 kfree(monitor); in cachefiles_read_backing_file_one()
471 struct cachefiles_one_read *monitor = NULL; in cachefiles_read_backing_file() local
484 if (!monitor) { in cachefiles_read_backing_file()
485 monitor = kzalloc(sizeof(*monitor), cachefiles_gfp); in cachefiles_read_backing_file()
486 if (!monitor) in cachefiles_read_backing_file()
489 monitor->op = fscache_get_retrieval(op); in cachefiles_read_backing_file()
490 init_waitqueue_func_entry(&monitor->monitor, in cachefiles_read_backing_file()
528 * monitor to transfer the data across */ in cachefiles_read_backing_file()
530 _debug("- monitor add"); in cachefiles_read_backing_file()
546 /* install a monitor */ in cachefiles_read_backing_file()
548 monitor->netfs_page = netpage; in cachefiles_read_backing_file()
551 monitor->back_page = backpage; in cachefiles_read_backing_file()
552 monitor->monitor.private = backpage; in cachefiles_read_backing_file()
553 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_backing_file()
554 monitor = NULL; in cachefiles_read_backing_file()
556 /* but the page may have been read before the monitor was in cachefiles_read_backing_file()
557 * installed, so the monitor may miss the event - so we have to in cachefiles_read_backing_file()
649 if (monitor) { in cachefiles_read_backing_file()
651 kfree(monitor); in cachefiles_read_backing_file()