• Home
  • Raw
  • Download

Lines Matching refs:pgio

790 ff_layout_get_ds_for_read(struct nfs_pageio_descriptor *pgio,  in ff_layout_get_ds_for_read()  argument
793 struct pnfs_layout_segment *lseg = pgio->pg_lseg; in ff_layout_get_ds_for_read()
796 ds = ff_layout_choose_best_ds_for_read(lseg, pgio->pg_mirror_idx, in ff_layout_get_ds_for_read()
798 if (ds || !pgio->pg_mirror_idx) in ff_layout_get_ds_for_read()
804 ff_layout_pg_get_read(struct nfs_pageio_descriptor *pgio, in ff_layout_pg_get_read() argument
808 pnfs_put_lseg(pgio->pg_lseg); in ff_layout_pg_get_read()
809 pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, in ff_layout_pg_get_read()
816 if (IS_ERR(pgio->pg_lseg)) { in ff_layout_pg_get_read()
817 pgio->pg_error = PTR_ERR(pgio->pg_lseg); in ff_layout_pg_get_read()
818 pgio->pg_lseg = NULL; in ff_layout_pg_get_read()
823 ff_layout_pg_check_layout(struct nfs_pageio_descriptor *pgio, in ff_layout_pg_check_layout() argument
826 pnfs_generic_pg_check_layout(pgio); in ff_layout_pg_check_layout()
827 pnfs_generic_pg_check_range(pgio, req); in ff_layout_pg_check_layout()
831 ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, in ff_layout_pg_init_read() argument
840 ff_layout_pg_check_layout(pgio, req); in ff_layout_pg_init_read()
842 if (!pgio->pg_lseg) { in ff_layout_pg_init_read()
843 ff_layout_pg_get_read(pgio, req, false); in ff_layout_pg_init_read()
844 if (!pgio->pg_lseg) in ff_layout_pg_init_read()
847 if (ff_layout_avoid_read_on_rw(pgio->pg_lseg)) { in ff_layout_pg_init_read()
848 ff_layout_pg_get_read(pgio, req, true); in ff_layout_pg_init_read()
849 if (!pgio->pg_lseg) in ff_layout_pg_init_read()
853 ds = ff_layout_get_ds_for_read(pgio, &ds_idx); in ff_layout_pg_init_read()
855 if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg)) in ff_layout_pg_init_read()
857 pnfs_generic_pg_cleanup(pgio); in ff_layout_pg_init_read()
863 mirror = FF_LAYOUT_COMP(pgio->pg_lseg, ds_idx); in ff_layout_pg_init_read()
864 pgm = &pgio->pg_mirrors[0]; in ff_layout_pg_init_read()
867 pgio->pg_mirror_idx = ds_idx; in ff_layout_pg_init_read()
869 if (NFS_SERVER(pgio->pg_inode)->flags & in ff_layout_pg_init_read()
871 pgio->pg_maxretrans = io_maxretrans; in ff_layout_pg_init_read()
874 if (pgio->pg_error < 0) in ff_layout_pg_init_read()
877 trace_pnfs_mds_fallback_pg_init_read(pgio->pg_inode, in ff_layout_pg_init_read()
879 NFS_I(pgio->pg_inode)->layout, in ff_layout_pg_init_read()
880 pgio->pg_lseg); in ff_layout_pg_init_read()
881 pgio->pg_maxretrans = 0; in ff_layout_pg_init_read()
882 nfs_pageio_reset_read_mds(pgio); in ff_layout_pg_init_read()
886 ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, in ff_layout_pg_init_write() argument
895 ff_layout_pg_check_layout(pgio, req); in ff_layout_pg_init_write()
896 if (!pgio->pg_lseg) { in ff_layout_pg_init_write()
897 pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, in ff_layout_pg_init_write()
904 if (IS_ERR(pgio->pg_lseg)) { in ff_layout_pg_init_write()
905 pgio->pg_error = PTR_ERR(pgio->pg_lseg); in ff_layout_pg_init_write()
906 pgio->pg_lseg = NULL; in ff_layout_pg_init_write()
911 if (pgio->pg_lseg == NULL) in ff_layout_pg_init_write()
915 if (pgio->pg_mirror_count != FF_LAYOUT_MIRROR_COUNT(pgio->pg_lseg)) in ff_layout_pg_init_write()
918 for (i = 0; i < pgio->pg_mirror_count; i++) { in ff_layout_pg_init_write()
919 mirror = FF_LAYOUT_COMP(pgio->pg_lseg, i); in ff_layout_pg_init_write()
920 ds = nfs4_ff_layout_prepare_ds(pgio->pg_lseg, mirror, true); in ff_layout_pg_init_write()
922 if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg)) in ff_layout_pg_init_write()
924 pnfs_generic_pg_cleanup(pgio); in ff_layout_pg_init_write()
929 pgm = &pgio->pg_mirrors[i]; in ff_layout_pg_init_write()
933 if (NFS_SERVER(pgio->pg_inode)->flags & in ff_layout_pg_init_write()
935 pgio->pg_maxretrans = io_maxretrans; in ff_layout_pg_init_write()
938 pnfs_generic_pg_cleanup(pgio); in ff_layout_pg_init_write()
939 pgio->pg_error = -EAGAIN; in ff_layout_pg_init_write()
942 trace_pnfs_mds_fallback_pg_init_write(pgio->pg_inode, in ff_layout_pg_init_write()
944 NFS_I(pgio->pg_inode)->layout, in ff_layout_pg_init_write()
945 pgio->pg_lseg); in ff_layout_pg_init_write()
946 pgio->pg_maxretrans = 0; in ff_layout_pg_init_write()
947 nfs_pageio_reset_write_mds(pgio); in ff_layout_pg_init_write()
948 pgio->pg_error = -EAGAIN; in ff_layout_pg_init_write()
952 ff_layout_pg_get_mirror_count_write(struct nfs_pageio_descriptor *pgio, in ff_layout_pg_get_mirror_count_write() argument
955 if (!pgio->pg_lseg) { in ff_layout_pg_get_mirror_count_write()
956 pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, in ff_layout_pg_get_mirror_count_write()
963 if (IS_ERR(pgio->pg_lseg)) { in ff_layout_pg_get_mirror_count_write()
964 pgio->pg_error = PTR_ERR(pgio->pg_lseg); in ff_layout_pg_get_mirror_count_write()
965 pgio->pg_lseg = NULL; in ff_layout_pg_get_mirror_count_write()
969 if (pgio->pg_lseg) in ff_layout_pg_get_mirror_count_write()
970 return FF_LAYOUT_MIRROR_COUNT(pgio->pg_lseg); in ff_layout_pg_get_mirror_count_write()
972 trace_pnfs_mds_fallback_pg_get_mirror_count(pgio->pg_inode, in ff_layout_pg_get_mirror_count_write()
974 NFS_I(pgio->pg_inode)->layout, in ff_layout_pg_get_mirror_count_write()
975 pgio->pg_lseg); in ff_layout_pg_get_mirror_count_write()
977 nfs_pageio_reset_write_mds(pgio); in ff_layout_pg_get_mirror_count_write()