• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/openzfs/module/os/linux/zfs/

Lines Matching refs:sg

130 	 *  allocate the sg table for an ABD.
135 #define abd_for_each_sg(abd, sg, n, i) \
136 for_each_sg(ABD_SCATTER(abd).abd_sgl, sg, n, i)
253 struct scatterlist *sg;
302 sg = table.sgl;
307 sg_set_page(sg, page, sg_size, 0);
311 sg = sg_next(sg);
371 struct scatterlist *sg = NULL;
387 abd_for_each_sg(abd, sg, nr_pages, i) {
394 sg_set_page(sg, page, PAGESIZE, 0);
422 struct scatterlist *sg = NULL;
433 abd_for_each_sg(abd, sg, nr_pages, i) {
434 page = sg_page(sg);
438 ASSERT3U(sg->length, <=, PAGE_SIZE << order);
451 struct scatterlist *sg = NULL;
478 abd_for_each_sg(abd_zero_scatter, sg, nr_pages, i) {
479 sg_set_page(sg, abd_zero_page, PAGESIZE, 0);
507 sg_init_table(struct scatterlist *sg, int nr)
509 memset(sg, 0, nr * sizeof (struct scatterlist));
510 sg[nr - 1].end = 1;
525 #define for_each_sg(sgl, sg, nr, i) \
526 for ((i) = 0, (sg) = (sgl); (i) < (nr); (i)++, (sg) = sg_next(sg))
529 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len,
534 sg->page = page;
535 sg->length = len;
539 sg_page(struct scatterlist *sg)
541 return (sg->page);
545 sg_next(struct scatterlist *sg)
547 if (sg->end)
550 return (sg + 1);
557 struct scatterlist *sg;
564 abd_for_each_sg(abd, sg, nr_pages, i) {
566 sg_set_page(sg, p, PAGESIZE, 0);
575 struct scatterlist *sg;
577 abd_for_each_sg(abd, sg, n, i) {
578 for (int j = 0; j < sg->length; j += PAGESIZE) {
579 struct page *p = nth_page(sg_page(sg), j >> PAGE_SHIFT);
590 struct scatterlist *sg;
607 abd_for_each_sg(abd_zero_scatter, sg, nr_pages, i) {
608 sg_set_page(sg, abd_zero_page, PAGESIZE, 0);
660 struct scatterlist *sg = NULL;
666 abd_for_each_sg(abd, sg, n, i) {
667 ASSERT3P(sg_page(sg), !=, NULL);
734 struct scatterlist *sg = abd->abd_u.abd_linear.abd_sgl;
739 ABD_SCATTER(abd).abd_sgl = sg;
766 struct scatterlist *sg = NULL;
782 abd_for_each_sg(sabd, sg, ABD_SCATTER(sabd).abd_nents, i) {
783 if (new_offset < sg->length)
785 new_offset -= sg->length;
788 ABD_SCATTER(abd).abd_sgl = sg;
1038 struct scatterlist *sg;
1043 sg = aiter.iter_sg;
1049 pg = nth_page(sg_page(sg), sgoff >> PAGE_SHIFT);