Home
last modified time | relevance | path

Searched refs:nr_pages (Results 1 – 25 of 63) sorted by relevance

123

/fs/iomap/
Dswapfile.c19 unsigned long nr_pages; /* number of pages collected */ member
33 unsigned long nr_pages; in iomap_swapfile_add_extent() local
40 if (unlikely(isi->nr_pages >= isi->sis->max)) in iomap_swapfile_add_extent()
42 max_pages = isi->sis->max - isi->nr_pages; in iomap_swapfile_add_extent()
55 nr_pages = next_ppage - first_ppage; in iomap_swapfile_add_extent()
56 nr_pages = min(nr_pages, max_pages); in iomap_swapfile_add_extent()
72 error = add_swap_extent(isi->sis, isi->nr_pages, nr_pages, first_ppage); in iomap_swapfile_add_extent()
76 isi->nr_pages += nr_pages; in iomap_swapfile_add_extent()
184 if (isi.nr_pages == 0) { in iomap_swapfile_activate()
190 sis->max = isi.nr_pages; in iomap_swapfile_activate()
[all …]
Dtrace.h28 TP_PROTO(struct inode *inode, int nr_pages),
29 TP_ARGS(inode, nr_pages),
33 __field(int, nr_pages)
38 __entry->nr_pages = nr_pages;
43 __entry->nr_pages)
48 TP_PROTO(struct inode *inode, int nr_pages), \
49 TP_ARGS(inode, nr_pages))
/fs/crypto/
Dbio.c118 unsigned int nr_pages; in fscrypt_zeroout_range() local
132 nr_pages = min_t(unsigned int, ARRAY_SIZE(pages), in fscrypt_zeroout_range()
142 for (i = 0; i < nr_pages; i++) { in fscrypt_zeroout_range()
148 nr_pages = i; in fscrypt_zeroout_range()
149 if (WARN_ON(nr_pages <= 0)) in fscrypt_zeroout_range()
153 bio = bio_alloc(GFP_NOFS, nr_pages); in fscrypt_zeroout_range()
180 } while (i != nr_pages && len != 0); in fscrypt_zeroout_range()
190 for (i = 0; i < nr_pages; i++) in fscrypt_zeroout_range()
/fs/
Dfs-writeback.c43 long nr_pages; member
958 static long wb_split_bdi_pages(struct bdi_writeback *wb, long nr_pages) in wb_split_bdi_pages() argument
963 if (nr_pages == LONG_MAX) in wb_split_bdi_pages()
972 return nr_pages; in wb_split_bdi_pages()
974 return DIV_ROUND_UP_ULL((u64)nr_pages * this_bw, tot_bw); in wb_split_bdi_pages()
1003 long nr_pages; in bdi_split_work_to_wbs() local
1018 nr_pages = wb_split_bdi_pages(wb, base_work->nr_pages); in bdi_split_work_to_wbs()
1023 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
1042 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
1120 work->nr_pages = dirty; in cgroup_writeback_by_id()
[all …]
Dfile_table.c389 unsigned long nr_pages = totalram_pages(); in files_maxfiles_init() local
390 unsigned long memreserve = (nr_pages - nr_free_pages()) * 3/2; in files_maxfiles_init()
392 memreserve = min(memreserve, nr_pages - 1); in files_maxfiles_init()
393 n = ((nr_pages - memreserve) * (PAGE_SIZE / 1024)) / 10; in files_maxfiles_init()
Daio.c126 long nr_pages; member
235 static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) in aio_private_file() argument
244 inode->i_size = PAGE_SIZE * nr_pages; in aio_private_file()
310 for (i = 0; i < ctx->nr_pages; i++) { in aio_free_ring()
416 if (idx < (pgoff_t)ctx->nr_pages) { in aio_migratepage()
469 int nr_pages; in aio_setup_ring() local
479 nr_pages = PFN_UP(size); in aio_setup_ring()
480 if (nr_pages < 0) in aio_setup_ring()
483 file = aio_private_file(ctx, nr_pages); in aio_setup_ring()
490 nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) in aio_setup_ring()
[all …]
/fs/ntfs/
Dfile.c492 pgoff_t index, const unsigned nr_pages, struct page **pages, in __ntfs_grab_cache_pages() argument
497 BUG_ON(!nr_pages); in __ntfs_grab_cache_pages()
523 } while (nr < nr_pages); in __ntfs_grab_cache_pages()
568 unsigned nr_pages, s64 pos, size_t bytes) in ntfs_prepare_pages_for_non_resident_write() argument
596 BUG_ON(!nr_pages); in ntfs_prepare_pages_for_non_resident_write()
604 vi->i_ino, ni->type, pages[0]->index, nr_pages, in ntfs_prepare_pages_for_non_resident_write()
621 } while (++u < nr_pages); in ntfs_prepare_pages_for_non_resident_write()
1173 if (likely(!err && ++u < nr_pages)) in ntfs_prepare_pages_for_non_resident_write()
1219 } while (++u < nr_pages); in ntfs_prepare_pages_for_non_resident_write()
1327 nr_pages = u; in ntfs_prepare_pages_for_non_resident_write()
[all …]
Dcompress.c497 unsigned int nr_pages = (end_vcn - start_vcn) << in ntfs_read_compressed_block() local
507 "%i.", index, cb_size, nr_pages); in ntfs_read_compressed_block()
515 pages = kmalloc_array(nr_pages, sizeof(struct page *), GFP_NOFS); in ntfs_read_compressed_block()
516 completed_pages = kmalloc_array(nr_pages + 1, sizeof(int), GFP_NOFS); in ntfs_read_compressed_block()
559 if (nr_pages < max_page) in ntfs_read_compressed_block()
560 max_page = nr_pages; in ntfs_read_compressed_block()
/fs/btrfs/
Dcompression.c163 for (i = 0; i < cb->nr_pages; i++) { in check_compressed_csum()
169 if (i == cb->nr_pages - 1) in check_compressed_csum()
255 for (index = 0; index < cb->nr_pages; index++) { in end_compressed_bio_read()
296 unsigned long nr_pages = end_index - index + 1; in end_compressed_writeback() local
303 while (nr_pages > 0) { in end_compressed_writeback()
306 nr_pages, ARRAY_SIZE(pages)), pages); in end_compressed_writeback()
308 nr_pages -= 1; in end_compressed_writeback()
318 nr_pages -= ret; in end_compressed_writeback()
365 for (index = 0; index < cb->nr_pages; index++) { in end_compressed_bio_write()
391 unsigned int nr_pages, in btrfs_submit_compressed_write() argument
[all …]
Dzlib.c102 int nr_pages = 0; in zlib_compress_pages() local
131 nr_pages = 1; in zlib_compress_pages()
200 if (nr_pages == nr_dest_pages) { in zlib_compress_pages()
211 pages[nr_pages] = out_page; in zlib_compress_pages()
212 nr_pages++; in zlib_compress_pages()
238 if (nr_pages == nr_dest_pages) { in zlib_compress_pages()
249 pages[nr_pages] = out_page; in zlib_compress_pages()
250 nr_pages++; in zlib_compress_pages()
266 *out_pages = nr_pages; in zlib_compress_pages()
Dlzo.c123 int nr_pages = 0; in lzo_compress_pages() local
159 nr_pages = 1; in lzo_compress_pages()
214 if (nr_pages == nr_dest_pages) { in lzo_compress_pages()
226 pages[nr_pages++] = out_page; in lzo_compress_pages()
270 *out_pages = nr_pages; in lzo_compress_pages()
Dzstd.c376 int nr_pages = 0; in zstd_compress_pages() local
413 pages[nr_pages++] = out_page; in zstd_compress_pages()
450 if (nr_pages == nr_dest_pages) { in zstd_compress_pages()
460 pages[nr_pages++] = out_page; in zstd_compress_pages()
510 if (nr_pages == nr_dest_pages) { in zstd_compress_pages()
520 pages[nr_pages++] = out_page; in zstd_compress_pages()
535 *out_pages = nr_pages; in zstd_compress_pages()
/fs/erofs/
Dzdata.c870 clt->cl->nr_pages = max_t(pgoff_t, clt->cl->nr_pages, index + 1); in z_erofs_do_read_page()
976 unsigned int i, inputsize, outputsize, llen, nr_pages; in z_erofs_decompress_pcluster() local
987 DBG_BUGON(!READ_ONCE(cl->nr_pages)); in z_erofs_decompress_pcluster()
990 nr_pages = cl->nr_pages; in z_erofs_decompress_pcluster()
992 if (nr_pages <= Z_EROFS_VMAP_ONSTACK_PAGES) { in z_erofs_decompress_pcluster()
994 } else if (nr_pages <= Z_EROFS_VMAP_GLOBAL_PAGES && in z_erofs_decompress_pcluster()
1000 if (nr_pages > Z_EROFS_VMAP_GLOBAL_PAGES) in z_erofs_decompress_pcluster()
1003 pages = kvmalloc_array(nr_pages, sizeof(struct page *), in z_erofs_decompress_pcluster()
1013 for (i = 0; i < nr_pages; ++i) in z_erofs_decompress_pcluster()
1037 DBG_BUGON(pagenr >= nr_pages); in z_erofs_decompress_pcluster()
[all …]
/fs/9p/
Dcache.h37 unsigned *nr_pages);
62 unsigned *nr_pages) in v9fs_readpages_from_fscache() argument
65 nr_pages); in v9fs_readpages_from_fscache()
118 unsigned *nr_pages) in v9fs_readpages_from_fscache() argument
Dcache.c281 unsigned *nr_pages) in __v9fs_readpages_from_fscache() argument
286 p9_debug(P9_DEBUG_FSC, "inode %p pages %u\n", inode, *nr_pages); in __v9fs_readpages_from_fscache()
291 mapping, pages, nr_pages, in __v9fs_readpages_from_fscache()
302 BUG_ON(*nr_pages != 0); in __v9fs_readpages_from_fscache()
/fs/cifs/
Dfile.c2285 unsigned int nr_pages = 0, i; in wdata_prepare_pages() local
2297 if (nr_pages == 0) in wdata_prepare_pages()
2342 ++nr_pages; in wdata_prepare_pages()
2346 if (nr_pages == 0) in wdata_prepare_pages()
2350 for (i = nr_pages; i < found_pages; i++) { in wdata_prepare_pages()
2355 return nr_pages; in wdata_prepare_pages()
2359 wdata_send_pages(struct cifs_writedata *wdata, unsigned int nr_pages, in wdata_send_pages() argument
2365 wdata->nr_pages = nr_pages; in wdata_send_pages()
2369 page_offset(wdata->pages[nr_pages - 1]), in wdata_send_pages()
2371 wdata->bytes = ((nr_pages - 1) * PAGE_SIZE) + wdata->tailsz; in wdata_send_pages()
[all …]
Dfscache.h108 unsigned *nr_pages) in cifs_readpages_from_fscache() argument
112 nr_pages); in cifs_readpages_from_fscache()
168 unsigned *nr_pages) in cifs_readpages_from_fscache() argument
/fs/squashfs/
Dfile.c543 unsigned int nr_pages = 0; in squashfs_readahead() local
567 nr_pages = __readahead_batch(ractl, pages, max_pages); in squashfs_readahead()
568 if (!nr_pages) in squashfs_readahead()
576 if ((pages[nr_pages - 1]->index >> shift) != index) in squashfs_readahead()
581 res = squashfs_readahead_fragment(pages, nr_pages, in squashfs_readahead()
592 actor = squashfs_page_actor_init_special(msblk, pages, nr_pages, in squashfs_readahead()
610 for (i = 0; i < nr_pages; i++) { in squashfs_readahead()
616 for (i = 0; i < nr_pages; i++) { in squashfs_readahead()
626 for (i = 0; i < nr_pages; i++) { in squashfs_readahead()
/fs/nfs/
Dfscache.c450 unsigned *nr_pages) in __nfs_readpages_from_fscache() argument
452 unsigned npages = *nr_pages; in __nfs_readpages_from_fscache()
459 mapping, pages, nr_pages, in __nfs_readpages_from_fscache()
463 if (*nr_pages < npages) in __nfs_readpages_from_fscache()
466 if (*nr_pages > 0) in __nfs_readpages_from_fscache()
468 *nr_pages); in __nfs_readpages_from_fscache()
473 BUG_ON(*nr_pages != 0); in __nfs_readpages_from_fscache()
Dfscache.h146 unsigned *nr_pages) in nfs_readpages_from_fscache() argument
150 nr_pages); in nfs_readpages_from_fscache()
225 unsigned *nr_pages) in nfs_readpages_from_fscache() argument
/fs/cachefiles/
Drdwr.c684 unsigned *nr_pages, in cachefiles_read_or_alloc_pages() argument
703 *nr_pages); in cachefiles_read_or_alloc_pages()
709 if (cachefiles_has_space(cache, 0, *nr_pages) < 0) in cachefiles_read_or_alloc_pages()
751 (*nr_pages)--; in cachefiles_read_or_alloc_pages()
777 ret, *nr_pages, list_empty(pages) ? " empty" : ""); in cachefiles_read_or_alloc_pages()
781 fscache_retrieval_complete(op, *nr_pages); in cachefiles_read_or_alloc_pages()
835 unsigned *nr_pages, in cachefiles_allocate_pages() argument
849 _enter("%p,,,%d,", object, *nr_pages); in cachefiles_allocate_pages()
851 ret = cachefiles_has_space(cache, 0, *nr_pages); in cachefiles_allocate_pages()
867 fscache_retrieval_complete(op, *nr_pages); in cachefiles_allocate_pages()
/fs/ext4/
Dreadpage.c282 unsigned int nr_pages = rac ? readahead_count(rac) : 1; in ext4_mpage_readpages() local
289 for (; nr_pages; nr_pages--) { in ext4_mpage_readpages()
303 last_block = block_in_file + nr_pages * blocks_per_page; in ext4_mpage_readpages()
413 bio = bio_alloc(GFP_KERNEL, bio_max_segs(nr_pages)); in ext4_mpage_readpages()
/fs/gfs2/
Daops.c235 int nr_pages, in gfs2_write_jdata_pagevec() argument
240 unsigned nrblocks = nr_pages * (PAGE_SIZE >> inode->i_blkbits); in gfs2_write_jdata_pagevec()
248 for(i = 0; i < nr_pages; i++) { in gfs2_write_jdata_pagevec()
333 int nr_pages; in gfs2_write_cache_jdata() local
368 nr_pages = pagevec_lookup_range_tag(&pvec, mapping, &index, end, in gfs2_write_cache_jdata()
370 if (nr_pages == 0) in gfs2_write_cache_jdata()
373 ret = gfs2_write_jdata_pagevec(mapping, wbc, &pvec, nr_pages, &done_index); in gfs2_write_cache_jdata()
/fs/btrfs/tests/
Dextent-io-tests.c26 unsigned long nr_pages = end_index - index + 1; in process_page_range() local
31 while (nr_pages > 0) { in process_page_range()
33 min_t(unsigned long, nr_pages, in process_page_range()
45 nr_pages -= ret; in process_page_range()
52 start, end, nr_pages, ret); in process_page_range()
/fs/afs/
Ddir.c113 pgoff_t last = req->nr_pages - 1; in afs_dir_read_cleanup()
117 if (unlikely(!req->nr_pages)) in afs_dir_read_cleanup()
197 pgoff_t last = req->nr_pages - 1; in afs_dir_dump()
205 req->pos, req->nr_pages, in afs_dir_dump()
232 pgoff_t last = req->nr_pages - 1; in afs_dir_check()
237 if (unlikely(!req->nr_pages)) in afs_dir_check()
285 int nr_pages, i, n; in afs_read_dir() local
313 nr_pages = (i_size + PAGE_SIZE - 1) / PAGE_SIZE; in afs_read_dir()
316 req->len = nr_pages * PAGE_SIZE; /* We can ask for more than there is */ in afs_read_dir()
326 i = req->nr_pages; in afs_read_dir()
[all …]

123