Lines Matching refs:schp
178 static int sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size);
187 static void sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp);
1873 sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize)
1878 schp->pages = kzalloc(sg_bufflen, gfp_flags);
1879 if (!schp->pages)
1881 schp->sglist_len = sg_bufflen;
1886 sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
1905 mx_sc_elems = sg_build_sgat(schp, sfp, sg_tablesize);
1931 schp->pages[k] = alloc_pages(gfp_mask, order);
1932 if (!schp->pages[k])
1947 schp->page_order = order;
1948 schp->k_use_sg = k;
1953 schp->bufflen = blk_size;
1959 __free_pages(schp->pages[i], order);
1968 sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp)
1971 "sg_remove_scat: k_use_sg=%d\n", schp->k_use_sg));
1972 if (schp->pages && schp->sglist_len > 0) {
1973 if (!schp->dio_in_use) {
1976 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) {
1980 k, schp->pages[k]));
1981 __free_pages(schp->pages[k], schp->page_order);
1984 kfree(schp->pages);
1987 memset(schp, 0, sizeof (*schp));
1993 Sg_scatter_hold *schp = &srp->data;
2002 num = 1 << (PAGE_SHIFT + schp->page_order);
2003 for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) {
2005 if (copy_to_user(outp, page_address(schp->pages[k]),
2010 if (copy_to_user(outp, page_address(schp->pages[k]),
2026 Sg_scatter_hold *schp = &sfp->reserve;
2033 if (0 == sg_build_indirect(schp, sfp, req_size))
2036 sg_remove_scat(sfp, schp);