Lines Matching refs:nr_pages
489 int nr_pages; in bio_get_nr_vecs() local
491 nr_pages = ((q->max_sectors << 9) + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_get_nr_vecs()
492 if (nr_pages > q->max_phys_segments) in bio_get_nr_vecs()
493 nr_pages = q->max_phys_segments; in bio_get_nr_vecs()
494 if (nr_pages > q->max_hw_segments) in bio_get_nr_vecs()
495 nr_pages = q->max_hw_segments; in bio_get_nr_vecs()
497 return nr_pages; in bio_get_nr_vecs()
792 int nr_pages = 0; in bio_copy_user_iov() local
805 nr_pages += end - start; in bio_copy_user_iov()
809 bmd = bio_alloc_map_data(nr_pages, iov_count, gfp_mask); in bio_copy_user_iov()
814 bio = bio_alloc(gfp_mask, nr_pages); in bio_copy_user_iov()
823 nr_pages = 1 << map_data->page_order; in bio_copy_user_iov()
835 if (i == map_data->nr_entries * nr_pages) { in bio_copy_user_iov()
840 page = map_data->pages[i / nr_pages]; in bio_copy_user_iov()
841 page += (i % nr_pages); in bio_copy_user_iov()
915 int nr_pages = 0; in __bio_map_user_iov() local
927 nr_pages += end - start; in __bio_map_user_iov()
935 if (!nr_pages) in __bio_map_user_iov()
938 bio = bio_alloc(gfp_mask, nr_pages); in __bio_map_user_iov()
943 pages = kcalloc(nr_pages, sizeof(struct page *), gfp_mask); in __bio_map_user_iov()
1004 for (i = 0; i < nr_pages; i++) { in __bio_map_user_iov()
1118 const int nr_pages = end - start; in __bio_map_kern() local
1122 bio = bio_alloc(gfp_mask, nr_pages); in __bio_map_kern()
1127 for (i = 0; i < nr_pages; i++) { in __bio_map_kern()