Lines Matching refs:folio
568 * same memory folio. Returns 1 if it sorted, 0 if it did not, or a negative
577 struct folio *folio;
582 /* No single folio could back this many records. */
587 folio = xfile_get_folio(si->array->xfile, lo_pos, len, XFILE_ALLOC);
588 if (IS_ERR(folio))
589 return PTR_ERR(folio);
590 if (!folio)
596 startp = folio_address(folio) + offset_in_folio(folio, lo_pos);
600 xfile_put_folio(si->array->xfile, folio);
793 if (si->folio)
794 xfile_put_folio(si->array->xfile, si->folio);
795 si->folio = NULL;
799 * Cache the folio backing the start of the given array element. If the array
800 * element is contained entirely within the folio, return a pointer to the
801 * cached folio. Otherwise, load the element into the scratchpad and return a
818 /* If the cached folio doesn't cover this index, release it. */
819 if (si->folio &&
823 /* Grab the first folio that backs this array element. */
824 if (!si->folio) {
827 si->folio = xfile_get_folio(si->array->xfile, idx_pos,
829 if (IS_ERR(si->folio))
830 return PTR_ERR(si->folio);
833 folio_pos(si->folio) + si->array->obj_size - 1);
835 next_pos = folio_pos(si->folio) + folio_size(si->folio);
844 * If this folio still doesn't cover the desired element, it must cross
845 * a folio boundary. Read into the scratchpad and we're done.
859 /* Otherwise return a pointer to the array element in the folio. */
860 *ptrp = folio_address(si->folio) + offset_in_folio(si->folio, idx_pos);
941 * If directly mapping the folio and sorting can solve our