Lines Matching refs:pgio
821 is_aligned_req(struct nfs_pageio_descriptor *pgio, in is_aligned_req() argument
828 if (pgio->pg_dreq == NULL) in is_aligned_req()
838 (req_offset(req) + req->wb_bytes == i_size_read(pgio->pg_inode))) { in is_aligned_req()
853 bl_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) in bl_pg_init_read() argument
855 if (!is_aligned_req(pgio, req, SECTOR_SIZE, false)) { in bl_pg_init_read()
856 nfs_pageio_reset_read_mds(pgio); in bl_pg_init_read()
860 pnfs_generic_pg_init_read(pgio, req); in bl_pg_init_read()
862 if (pgio->pg_lseg && in bl_pg_init_read()
863 test_bit(NFS_LSEG_UNAVAILABLE, &pgio->pg_lseg->pls_flags)) { in bl_pg_init_read()
864 pnfs_error_mark_layout_for_return(pgio->pg_inode, pgio->pg_lseg); in bl_pg_init_read()
865 pnfs_set_lo_fail(pgio->pg_lseg); in bl_pg_init_read()
866 nfs_pageio_reset_read_mds(pgio); in bl_pg_init_read()
875 bl_pg_test_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, in bl_pg_test_read() argument
878 if (!is_aligned_req(pgio, req, SECTOR_SIZE, false)) in bl_pg_test_read()
880 return pnfs_generic_pg_test(pgio, prev, req); in bl_pg_test_read()
907 bl_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) in bl_pg_init_write() argument
911 if (!is_aligned_req(pgio, req, PAGE_SIZE, true)) { in bl_pg_init_write()
912 nfs_pageio_reset_write_mds(pgio); in bl_pg_init_write()
916 if (pgio->pg_dreq == NULL) in bl_pg_init_write()
917 wb_size = pnfs_num_cont_bytes(pgio->pg_inode, in bl_pg_init_write()
920 wb_size = nfs_dreq_bytes_left(pgio->pg_dreq); in bl_pg_init_write()
922 pnfs_generic_pg_init_write(pgio, req, wb_size); in bl_pg_init_write()
924 if (pgio->pg_lseg && in bl_pg_init_write()
925 test_bit(NFS_LSEG_UNAVAILABLE, &pgio->pg_lseg->pls_flags)) { in bl_pg_init_write()
927 pnfs_error_mark_layout_for_return(pgio->pg_inode, pgio->pg_lseg); in bl_pg_init_write()
928 pnfs_set_lo_fail(pgio->pg_lseg); in bl_pg_init_write()
929 nfs_pageio_reset_write_mds(pgio); in bl_pg_init_write()
938 bl_pg_test_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, in bl_pg_test_write() argument
941 if (!is_aligned_req(pgio, req, PAGE_SIZE, true)) in bl_pg_test_write()
943 return pnfs_generic_pg_test(pgio, prev, req); in bl_pg_test_write()