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);
1857 sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize) in sg_build_sgat() argument
1862 schp->pages = kzalloc(sg_bufflen, gfp_flags); in sg_build_sgat()
1863 if (!schp->pages) in sg_build_sgat()
1865 schp->sglist_len = sg_bufflen; in sg_build_sgat()
1870 sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) in sg_build_indirect() argument
1888 mx_sc_elems = sg_build_sgat(schp, sfp, sg_tablesize); in sg_build_indirect()
1911 schp->pages[k] = alloc_pages(gfp_mask, order); in sg_build_indirect()
1912 if (!schp->pages[k]) in sg_build_indirect()
1927 schp->page_order = order; in sg_build_indirect()
1928 schp->k_use_sg = k; in sg_build_indirect()
1933 schp->bufflen = blk_size; in sg_build_indirect()
1939 __free_pages(schp->pages[i], order); in sg_build_indirect()
1948 sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp) in sg_remove_scat() argument
1951 "sg_remove_scat: k_use_sg=%d\n", schp->k_use_sg)); in sg_remove_scat()
1952 if (schp->pages && schp->sglist_len > 0) { in sg_remove_scat()
1953 if (!schp->dio_in_use) { in sg_remove_scat()
1956 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { in sg_remove_scat()
1960 k, schp->pages[k])); in sg_remove_scat()
1961 __free_pages(schp->pages[k], schp->page_order); in sg_remove_scat()
1964 kfree(schp->pages); in sg_remove_scat()
1967 memset(schp, 0, sizeof (*schp)); in sg_remove_scat()
1973 Sg_scatter_hold *schp = &srp->data; in sg_read_oxfer() local
1982 num = 1 << (PAGE_SHIFT + schp->page_order); in sg_read_oxfer()
1983 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { in sg_read_oxfer()
1985 if (copy_to_user(outp, page_address(schp->pages[k]), in sg_read_oxfer()
1990 if (copy_to_user(outp, page_address(schp->pages[k]), in sg_read_oxfer()
2006 Sg_scatter_hold *schp = &sfp->reserve; in sg_build_reserve() local
2013 if (0 == sg_build_indirect(schp, sfp, req_size)) in sg_build_reserve()
2016 sg_remove_scat(sfp, schp); in sg_build_reserve()