Skip to contentSkip to conversation

mm-filemap-use-page_cache_sync_ra-to-kick-off-read-ahead.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 20, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/filemap: use page_cache_sync_ra() to kick off read-ahead
has been removed from the -mm tree. Its filename was
mm-filemap-use-page_cache_sync_ra-to-kick-off-read-ahead.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Jens Axboe <[email protected]>
Subject: mm/filemap: use page_cache_sync_ra() to kick off read-ahead
Date: Fri, 20 Dec 2024 08:47:40 -0700

Rather than use the page_cache_sync_readahead() helper, define our own ractl and use page_cache_sync_ra() directly. In preparation for needing to modify ractl inside filemap_get_pages().

No functional changes in this patch.

---

 mm/filemap.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/filemap.c renamed from mm/filemap.c~mm-filemap-use-page_cache_sync_ra-to-kick-off-read-ahead +3 -3
@@ -2499,7 +2499,6 @@ static int filemap_get_pages(struct kioc
 {
 	struct file *filp = iocb->ki_filp;
 	struct address_space *mapping = filp->f_mapping;
-	struct file_ra_state *ra = &filp->f_ra;
 	pgoff_t index = iocb->ki_pos >> PAGE_SHIFT;
 	pgoff_t last_index;
 	struct folio *folio;
@@ -2514,12 +2513,13 @@ retry:
 
 	filemap_get_read_batch(mapping, index, last_index - 1, fbatch);
 	if (!folio_batch_count(fbatch)) {
+		DEFINE_READAHEAD(ractl, filp, &filp->f_ra, mapping, index);
+
 		if (iocb->ki_flags & IOCB_NOIO)
 			return -EAGAIN;
 		if (iocb->ki_flags & IOCB_NOWAIT)
 			flags = memalloc_noio_save();
-		page_cache_sync_readahead(mapping, ra, filp, index,
-				last_index - index);
+		page_cache_sync_ra(&ractl, last_index - index);
 		if (iocb->ki_flags & IOCB_NOWAIT)
 			memalloc_noio_restore(flags);
 		filemap_get_read_batch(mapping, index, last_index - 1, fbatch);

_

Patches currently in -mm which might be from [email protected] are