Lines Matching defs:last_pg
145 static void cluster_read_upl_release(upl_t upl, int start_pg, int last_pg, int flags);
3109 cluster_read_upl_release(upl_t upl, int start_pg, int last_pg, int flags)
3114 if ((range = last_pg - start_pg)) {
3133 int last_pg;
3363 for (last_pg = start_pg; last_pg < pages_in_upl; last_pg++) {
3364 if (upl_valid_page(pl, last_pg))
3372 if (start_pg < last_pg) {
3380 io_size = (last_pg - start_pg) * PAGE_SIZE;
3401 for (uio_last = last_pg; uio_last < pages_in_upl; uio_last++) {
3495 if (start_pg < last_pg) {
3502 io_size = (last_pg - start_pg) * PAGE_SIZE;
3515 if ((last_pg - start_pg) < pages_in_upl) {
3526 (int)upl, -1, pages_in_upl - (last_pg - start_pg), 0, 0);
3538 cluster_read_upl_release(upl, last_pg, uio_last, flags);
4275 int last_pg;
4366 for (last_pg = pages_in_upl - 1; last_pg >= 0; last_pg--) {
4367 if (upl_page_present(pl, last_pg))
4370 pages_in_upl = last_pg + 1;
4377 for (last_pg = 0; last_pg < pages_in_upl; ) {
4384 for (start_pg = last_pg; start_pg < pages_in_upl; start_pg++) {
4395 for (last_pg = start_pg; last_pg < pages_in_upl; last_pg++) {
4396 if (!upl_page_present(pl, last_pg))
4400 if (last_pg > start_pg) {
4408 io_size = (last_pg - start_pg) * PAGE_SIZE;
4711 int last_pg;
4794 for (last_pg = pages_in_upl - 1; last_pg >= 0; last_pg--) {
4795 if (upl_page_present(pl, last_pg))
4798 pages_in_upl = last_pg + 1;
4807 for (last_pg = 0; last_pg < pages_in_upl; ) {
4813 for (start_pg = last_pg; start_pg < pages_in_upl; start_pg++) {
4829 if (start_pg > last_pg)
4833 size -= ((start_pg - last_pg) * PAGE_SIZE);
4838 for (last_pg = start_pg; last_pg < pages_in_upl; last_pg++) {
4839 if (!upl_dirty_page(pl, last_pg))
4844 io_size = min(size, (last_pg - start_pg) * PAGE_SIZE);