/linux/mm/ |
H A D | readahead.c | 205 void page_cache_ra_unbounded(struct readahead_control *ractl, in page_cache_ra_unbounded() argument 208 struct address_space *mapping = ractl->mapping; in page_cache_ra_unbounded() 209 unsigned long ra_folio_index, index = readahead_index(ractl); in page_cache_ra_unbounded() 235 ra_folio_index = round_up(readahead_index(ractl) + nr_to_read - lookahead_size, in page_cache_ra_unbounded() 238 nr_to_read += readahead_index(ractl) - index; in page_cache_ra_unbounded() 239 ractl->_index = index; in page_cache_ra_unbounded() 257 read_pages(ractl); in page_cache_ra_unbounded() 258 ractl->_index += min_nrpages; in page_cache_ra_unbounded() 259 i = ractl->_index + ractl->_nr_pages - index; in page_cache_ra_unbounded() 273 read_pages(ractl); in page_cache_ra_unbounded() [all …]
|
H A D | filemap.c | 2515 DEFINE_READAHEAD(ractl, file, &file->f_ra, mapping, folio->index); in filemap_readahead() 2519 page_cache_async_ra(&ractl, folio, last_index - folio->index); in filemap_readahead() 3147 DEFINE_READAHEAD(ractl, file, ra, mapping, vmf->pgoff); in do_sync_mmap_readahead() 3156 ractl._index &= ~((unsigned long)HPAGE_PMD_NR - 1); in do_sync_mmap_readahead() 3165 page_cache_ra_order(&ractl, ra, HPAGE_PMD_ORDER); in do_sync_mmap_readahead() 3178 page_cache_sync_ra(&ractl, ra->ra_pages); in do_sync_mmap_readahead() 3201 ractl._index = ra->start; in do_sync_mmap_readahead() 3202 page_cache_ra_order(&ractl, ra, 0); in do_sync_mmap_readahead() 3216 DEFINE_READAHEAD(ractl, file, ra, file->f_mapping, vmf->pgoff); in do_async_mmap_readahead() 3230 page_cache_async_ra(&ractl, folio, ra->ra_pages); in do_async_mmap_readahead()
|
H A D | internal.h | 401 DEFINE_READAHEAD(ractl, file, &file->f_ra, mapping, index); in force_page_cache_readahead() 402 force_page_cache_ra(&ractl, nr_to_read); in force_page_cache_readahead()
|
/linux/include/linux/ |
H A D | pagemap.h | 1357 #define DEFINE_READAHEAD(ractl, f, r, m, i) \ argument 1358 struct readahead_control ractl = { \ 1372 void readahead_expand(struct readahead_control *ractl, 1393 DEFINE_READAHEAD(ractl, file, ra, mapping, index); in page_cache_sync_readahead() 1394 page_cache_sync_ra(&ractl, req_count); in page_cache_sync_readahead() 1415 DEFINE_READAHEAD(ractl, file, ra, mapping, folio->index); in page_cache_async_readahead() 1416 page_cache_async_ra(&ractl, folio, req_count); in page_cache_async_readahead() 1419 static inline struct folio *__readahead_folio(struct readahead_control *ractl) in __readahead_folio() argument 1423 BUG_ON(ractl->_batch_count > ractl->_nr_pages); in __readahead_folio() 1424 ractl->_nr_pages -= ractl->_batch_count; in __readahead_folio() [all …]
|
H A D | netfs.h | 234 struct readahead_control *ractl; /* Readahead descriptor */ member
|
/linux/fs/nfs/ |
H A D | read.c | 405 void nfs_readahead(struct readahead_control *ractl) in nfs_readahead() argument 409 unsigned int nr_pages = readahead_count(ractl); in nfs_readahead() 410 struct file *file = ractl->file; in nfs_readahead() 411 struct inode *inode = ractl->mapping->host; in nfs_readahead() 415 trace_nfs_aop_readahead(inode, readahead_pos(ractl), nr_pages); in nfs_readahead() 417 task_io_account_read(readahead_length(ractl)); in nfs_readahead() 423 ret = nfs_netfs_readahead(ractl); in nfs_readahead() 438 while ((folio = readahead_folio(ractl)) != NULL) { in nfs_readahead()
|
H A D | fscache.h | 98 extern int nfs_netfs_readahead(struct readahead_control *ractl); 176 static inline int nfs_netfs_readahead(struct readahead_control *ractl) in nfs_netfs_readahead() argument
|
H A D | fscache.c | 252 int nfs_netfs_readahead(struct readahead_control *ractl) in nfs_netfs_readahead() argument 254 struct inode *inode = ractl->mapping->host; in nfs_netfs_readahead() 259 netfs_readahead(ractl); in nfs_netfs_readahead()
|
/linux/fs/squashfs/ |
H A D | file.c | 566 static void squashfs_readahead(struct readahead_control *ractl) in squashfs_readahead() argument 568 struct inode *inode = ractl->mapping->host; in squashfs_readahead() 572 loff_t start = readahead_pos(ractl) & ~mask; in squashfs_readahead() 573 size_t len = readahead_length(ractl) + readahead_pos(ractl) - start; in squashfs_readahead() 581 readahead_expand(ractl, start, (len | mask) + 1); in squashfs_readahead() 599 nr_pages = __readahead_batch(ractl, pages, max_pages); in squashfs_readahead() 603 if (readahead_pos(ractl) >= i_size_read(inode)) in squashfs_readahead() 648 start += readahead_batch_length(ractl); in squashfs_readahead()
|
/linux/fs/bcachefs/ |
H A D | fs-io-buffered.c | 46 struct readahead_control *ractl) in readpages_iter_init() argument 50 *iter = (struct readpages_iter) { ractl->mapping }; in readpages_iter_init() 52 while ((folio = __readahead_folio(ractl))) { in readpages_iter_init() 56 ractl->_nr_pages += folio_nr_pages(folio); in readpages_iter_init() 57 ractl->_index -= folio_nr_pages(folio); in readpages_iter_init() 244 void bch2_readahead(struct readahead_control *ractl) in bch2_readahead() argument 246 struct bch_inode_info *inode = to_bch_ei(ractl->mapping->host); in bch2_readahead() 254 int ret = readpages_iter_init(&readpages_iter, ractl); in bch2_readahead()
|
/linux/fs/f2fs/ |
H A D | verity.c | 268 DEFINE_READAHEAD(ractl, NULL, NULL, inode->i_mapping, index); in f2fs_read_merkle_tree_page() 273 page_cache_ra_unbounded(&ractl, num_ra_pages, 0); in f2fs_read_merkle_tree_page()
|
H A D | file.c | 4210 DEFINE_READAHEAD(ractl, NULL, NULL, inode->i_mapping, page_idx); in redirty_blocks() 4216 page_cache_ra_unbounded(&ractl, len, 0); in redirty_blocks()
|
/linux/fs/ext4/ |
H A D | verity.c | 370 DEFINE_READAHEAD(ractl, NULL, NULL, inode->i_mapping, index); in ext4_read_merkle_tree_page() 375 page_cache_ra_unbounded(&ractl, num_ra_pages, 0); in ext4_read_merkle_tree_page()
|