Lines Matching refs:schp
183 static int sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size);
192 static void sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp);
1846 sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize) in sg_build_sgat() argument
1851 schp->pages = kzalloc(sg_bufflen, gfp_flags); in sg_build_sgat()
1852 if (!schp->pages) in sg_build_sgat()
1854 schp->sglist_len = sg_bufflen; in sg_build_sgat()
1859 sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) in sg_build_indirect() argument
1877 mx_sc_elems = sg_build_sgat(schp, sfp, sg_tablesize); in sg_build_indirect()
1900 schp->pages[k] = alloc_pages(gfp_mask, order); in sg_build_indirect()
1901 if (!schp->pages[k]) in sg_build_indirect()
1916 schp->page_order = order; in sg_build_indirect()
1917 schp->k_use_sg = k; in sg_build_indirect()
1922 schp->bufflen = blk_size; in sg_build_indirect()
1928 __free_pages(schp->pages[i], order); in sg_build_indirect()
1937 sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp) in sg_remove_scat() argument
1940 "sg_remove_scat: k_use_sg=%d\n", schp->k_use_sg)); in sg_remove_scat()
1941 if (schp->pages && schp->sglist_len > 0) { in sg_remove_scat()
1942 if (!schp->dio_in_use) { in sg_remove_scat()
1945 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { in sg_remove_scat()
1949 k, schp->pages[k])); in sg_remove_scat()
1950 __free_pages(schp->pages[k], schp->page_order); in sg_remove_scat()
1953 kfree(schp->pages); in sg_remove_scat()
1956 memset(schp, 0, sizeof (*schp)); in sg_remove_scat()
1962 Sg_scatter_hold *schp = &srp->data; in sg_read_oxfer() local
1971 num = 1 << (PAGE_SHIFT + schp->page_order); in sg_read_oxfer()
1972 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { in sg_read_oxfer()
1974 if (copy_to_user(outp, page_address(schp->pages[k]), in sg_read_oxfer()
1979 if (copy_to_user(outp, page_address(schp->pages[k]), in sg_read_oxfer()
1995 Sg_scatter_hold *schp = &sfp->reserve; in sg_build_reserve() local
2002 if (0 == sg_build_indirect(schp, sfp, req_size)) in sg_build_reserve()
2005 sg_remove_scat(sfp, schp); in sg_build_reserve()