Lines Matching refs:pgio

2684 pnfs_generic_pg_check_layout(struct nfs_pageio_descriptor *pgio)  in pnfs_generic_pg_check_layout()  argument
2686 if (pgio->pg_lseg == NULL || in pnfs_generic_pg_check_layout()
2687 test_bit(NFS_LSEG_VALID, &pgio->pg_lseg->pls_flags)) in pnfs_generic_pg_check_layout()
2689 pnfs_put_lseg(pgio->pg_lseg); in pnfs_generic_pg_check_layout()
2690 pgio->pg_lseg = NULL; in pnfs_generic_pg_check_layout()
2699 pnfs_generic_pg_check_range(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) in pnfs_generic_pg_check_range() argument
2701 if (pgio->pg_lseg && !pnfs_lseg_request_intersecting(pgio->pg_lseg, req)) { in pnfs_generic_pg_check_range()
2702 pnfs_put_lseg(pgio->pg_lseg); in pnfs_generic_pg_check_range()
2703 pgio->pg_lseg = NULL; in pnfs_generic_pg_check_range()
2709 pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) in pnfs_generic_pg_init_read() argument
2713 pnfs_generic_pg_check_layout(pgio); in pnfs_generic_pg_init_read()
2714 pnfs_generic_pg_check_range(pgio, req); in pnfs_generic_pg_init_read()
2715 if (pgio->pg_lseg == NULL) { in pnfs_generic_pg_init_read()
2716 if (pgio->pg_dreq == NULL) in pnfs_generic_pg_init_read()
2717 rd_size = i_size_read(pgio->pg_inode) - req_offset(req); in pnfs_generic_pg_init_read()
2719 rd_size = nfs_dreq_bytes_left(pgio->pg_dreq); in pnfs_generic_pg_init_read()
2721 pgio->pg_lseg = in pnfs_generic_pg_init_read()
2722 pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), in pnfs_generic_pg_init_read()
2726 if (IS_ERR(pgio->pg_lseg)) { in pnfs_generic_pg_init_read()
2727 pgio->pg_error = PTR_ERR(pgio->pg_lseg); in pnfs_generic_pg_init_read()
2728 pgio->pg_lseg = NULL; in pnfs_generic_pg_init_read()
2733 if (pgio->pg_lseg == NULL) in pnfs_generic_pg_init_read()
2734 nfs_pageio_reset_read_mds(pgio); in pnfs_generic_pg_init_read()
2740 pnfs_generic_pg_init_write(struct nfs_pageio_descriptor *pgio, in pnfs_generic_pg_init_write() argument
2743 pnfs_generic_pg_check_layout(pgio); in pnfs_generic_pg_init_write()
2744 pnfs_generic_pg_check_range(pgio, req); in pnfs_generic_pg_init_write()
2745 if (pgio->pg_lseg == NULL) { in pnfs_generic_pg_init_write()
2746 pgio->pg_lseg = in pnfs_generic_pg_init_write()
2747 pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), in pnfs_generic_pg_init_write()
2750 if (IS_ERR(pgio->pg_lseg)) { in pnfs_generic_pg_init_write()
2751 pgio->pg_error = PTR_ERR(pgio->pg_lseg); in pnfs_generic_pg_init_write()
2752 pgio->pg_lseg = NULL; in pnfs_generic_pg_init_write()
2757 if (pgio->pg_lseg == NULL) in pnfs_generic_pg_init_write()
2758 nfs_pageio_reset_write_mds(pgio); in pnfs_generic_pg_init_write()
2777 pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, in pnfs_generic_pg_test() argument
2783 size = nfs_generic_pg_test(pgio, prev, req); in pnfs_generic_pg_test()
2798 if (pgio->pg_lseg) { in pnfs_generic_pg_test()
2799 seg_end = pnfs_end_offset(pgio->pg_lseg->pls_range.offset, in pnfs_generic_pg_test()
2800 pgio->pg_lseg->pls_range.length); in pnfs_generic_pg_test()
2820 struct nfs_pageio_descriptor pgio; in pnfs_write_done_resend_to_mds() local
2823 nfs_pageio_init_write(&pgio, hdr->inode, FLUSH_STABLE, true, in pnfs_write_done_resend_to_mds()
2825 return nfs_pageio_resend(&pgio, hdr); in pnfs_write_done_resend_to_mds()
2949 struct nfs_pageio_descriptor pgio; in pnfs_read_done_resend_to_mds() local
2952 nfs_pageio_init_read(&pgio, hdr->inode, true, hdr->completion_ops); in pnfs_read_done_resend_to_mds()
2953 return nfs_pageio_resend(&pgio, hdr); in pnfs_read_done_resend_to_mds()
3024 struct nfs_pageio_descriptor pgio; in pnfs_read_resend_pnfs() local
3031 nfs_pageio_init_read(&pgio, hdr->inode, false, in pnfs_read_resend_pnfs()
3033 pgio.pg_mirror_idx = mirror_idx; in pnfs_read_resend_pnfs()
3034 hdr->task.tk_status = nfs_pageio_resend(&pgio, hdr); in pnfs_read_resend_pnfs()