linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Raghav <p.raghav@samsung.com>
To: hubcap@omnibond.com, brauner@kernel.org, martin@omnibond.com,
	willy@infradead.org, hch@lst.de, minchan@kernel.org,
	viro@zeniv.linux.org.uk, axboe@kernel.dk,
	akpm@linux-foundation.org, senozhatsky@chromium.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org,
	linux-block@vger.kernel.org, gost.dev@samsung.com,
	mcgrof@kernel.org, Pankaj Raghav <p.raghav@samsung.com>
Subject: [PATCH v3 1/3] orangefs: use folios in orangefs_readahead
Date: Tue, 11 Apr 2023 14:29:18 +0200	[thread overview]
Message-ID: <20230411122920.30134-2-p.raghav@samsung.com> (raw)
In-Reply-To: <20230411122920.30134-1-p.raghav@samsung.com>

Convert orangefs_readahead() from using struct page to struct folio.
This conversion removes the call to page_endio() which is soon to be
removed, and simplifies the final page handling.

The page error flags is not required to be set in the error case as
orangefs doesn't depend on them.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
 fs/orangefs/inode.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index aefdf1d3be7c..9014bbcc8031 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -244,7 +244,7 @@ static void orangefs_readahead(struct readahead_control *rac)
 	struct iov_iter iter;
 	struct inode *inode = rac->mapping->host;
 	struct xarray *i_pages;
-	struct page *page;
+	struct folio *folio;
 	loff_t new_start = readahead_pos(rac);
 	int ret;
 	size_t new_len = 0;
@@ -275,9 +275,10 @@ static void orangefs_readahead(struct readahead_control *rac)
 		ret = 0;
 
 	/* clean up. */
-	while ((page = readahead_page(rac))) {
-		page_endio(page, false, ret);
-		put_page(page);
+	while ((folio = readahead_folio(rac))) {
+		if (!ret)
+			folio_mark_uptodate(folio);
+		folio_unlock(folio);
 	}
 }
 
-- 
2.34.1



  parent reply	other threads:[~2023-04-11 12:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230411122922eucas1p1ed50c7c4c98104f936e3057f975c72ac@eucas1p1.samsung.com>
2023-04-11 12:29 ` [PATCH v3 0/3] remove page_endio() v3 Pankaj Raghav
     [not found]   ` <CGME20230411122923eucas1p27e097fa66db8e166d14658bc7c6f180b@eucas1p2.samsung.com>
2023-04-11 12:29     ` Pankaj Raghav [this message]
     [not found]   ` <CGME20230411122923eucas1p1dfc182a2c785eeb362b9d670dfe3ba2f@eucas1p1.samsung.com>
2023-04-11 12:29     ` [PATCH v3 2/3] mpage: split submit_bio and bio end_io handler for reads and writes Pankaj Raghav
2023-04-11 12:30       ` Christoph Hellwig
     [not found]   ` <CGME20230411122924eucas1p16c6abcf91a3e04c6a0a225606ca0044d@eucas1p1.samsung.com>
2023-04-11 12:29     ` [PATCH v3 3/3] mpage: use folios in bio end_io handler Pankaj Raghav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230411122920.30134-2-p.raghav@samsung.com \
    --to=p.raghav@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=devel@lists.orangefs.org \
    --cc=gost.dev@samsung.com \
    --cc=hch@lst.de \
    --cc=hubcap@omnibond.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=martin@omnibond.com \
    --cc=mcgrof@kernel.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox