Lines Matching defs:fbatch
270 * @fbatch: batch of folios to delete
273 * @fbatch from the mapping. The function expects @fbatch to be sorted
275 * It tolerates holes in @fbatch (mapping entries at those indices are not
281 struct folio_batch *fbatch)
283 XA_STATE(xas, &mapping->i_pages, fbatch->folios[0]->index);
290 if (i >= folio_batch_count(fbatch))
303 if (folio != fbatch->folios[i]) {
305 fbatch->folios[i]->index, folio);
322 struct folio_batch *fbatch)
326 if (!folio_batch_count(fbatch))
331 for (i = 0; i < folio_batch_count(fbatch); i++) {
332 struct folio *folio = fbatch->folios[i];
337 page_cache_delete_batch(mapping, fbatch);
343 for (i = 0; i < folio_batch_count(fbatch); i++)
344 filemap_free_folio(mapping, fbatch->folios[i]);
516 struct folio_batch fbatch;
519 folio_batch_init(&fbatch);
525 PAGECACHE_TAG_WRITEBACK, &fbatch);
531 struct folio *folio = fbatch.folios[i];
535 folio_batch_release(&fbatch);
2101 * @fbatch: Where the resulting entries are placed.
2105 * the mapping. The entries are placed in @fbatch. find_get_entries()
2117 pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices)
2124 indices[fbatch->nr] = xas.xa_index;
2125 if (!folio_batch_add(fbatch, folio))
2129 if (folio_batch_count(fbatch)) {
2131 int idx = folio_batch_count(fbatch) - 1;
2133 folio = fbatch->folios[idx];
2142 return folio_batch_count(fbatch);
2150 * @fbatch: Where the resulting entries are placed.
2151 * @indices: The cache indices of the entries in @fbatch.
2166 pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices)
2205 indices[fbatch->nr] = xas.xa_index;
2206 if (!folio_batch_add(fbatch, folio))
2216 return folio_batch_count(fbatch);
2224 * @fbatch: The batch to fill.
2228 * in @fbatch with an elevated reference count.
2234 pgoff_t end, struct folio_batch *fbatch)
2236 return filemap_get_folios_tag(mapping, start, end, XA_PRESENT, fbatch);
2245 * @fbatch: The batch to fill
2256 pgoff_t *start, pgoff_t end, struct folio_batch *fbatch)
2285 if (!folio_batch_add(fbatch, folio)) {
2300 nr = folio_batch_count(fbatch);
2303 folio = fbatch->folios[nr - 1];
2308 return folio_batch_count(fbatch);
2318 * @fbatch: The batch to fill
2332 pgoff_t end, xa_mark_t tag, struct folio_batch *fbatch)
2346 if (!folio_batch_add(fbatch, folio)) {
2365 return folio_batch_count(fbatch);
2374 * @fbatch: The batch to fill
2387 pgoff_t end, struct folio_batch *fbatch)
2405 if (!folio_batch_add(fbatch, folio)) {
2424 return folio_batch_count(fbatch);
2457 pgoff_t index, pgoff_t max, struct folio_batch *fbatch)
2476 if (!folio_batch_add(fbatch, folio))
2601 static int filemap_create_folio(struct kiocb *iocb, struct folio_batch *fbatch)
2646 folio_batch_add(fbatch, folio);
2669 struct folio_batch *fbatch, bool need_uptodate)
2686 filemap_get_read_batch(mapping, index, last_index - 1, fbatch);
2687 if (!folio_batch_count(fbatch)) {
2699 filemap_get_read_batch(mapping, index, last_index - 1, fbatch);
2701 if (!folio_batch_count(fbatch)) {
2702 err = filemap_create_folio(iocb, fbatch);
2708 folio = fbatch->folios[folio_batch_count(fbatch) - 1];
2715 if (folio_batch_count(fbatch) > 1) {
2730 if (likely(--fbatch->nr))
2776 struct folio_batch fbatch;
2790 folio_batch_init(&fbatch);
2806 error = filemap_get_pages(iocb, iter->count, &fbatch, false);
2834 fbatch.folios[0]))
2835 folio_mark_accessed(fbatch.folios[0]);
2837 for (i = 0; i < folio_batch_count(&fbatch); i++) {
2838 struct folio *folio = fbatch.folios[i];
2869 for (i = 0; i < folio_batch_count(&fbatch); i++) {
2870 struct folio *folio = fbatch.folios[i];
2875 folio_batch_init(&fbatch);
3058 struct folio_batch fbatch;
3076 folio_batch_init(&fbatch);
3085 error = filemap_get_pages(&iocb, len, &fbatch, true);
3108 for (i = 0; i < folio_batch_count(&fbatch); i++) {
3109 struct folio *folio = fbatch.folios[i];
3136 folio_batch_release(&fbatch);
3140 folio_batch_release(&fbatch);