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