public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 10/10] btrfs: Sink mirror_num argument in __do_readpage
Date: Wed,  9 Sep 2020 12:49:14 +0300	[thread overview]
Message-ID: <20200909094914.29721-11-nborisov@suse.com> (raw)
In-Reply-To: <20200909094914.29721-1-nborisov@suse.com>

It's always set to 0 by the 2 callers so move it inside __do_readpage.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/extent_io.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index bb30e34b4f53..f87c19668e0d 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3142,9 +3142,8 @@ __get_extent_map(struct inode *inode, struct page *page, size_t pg_offset,
  * return 0 on success, otherwise return error
  */
 static int __do_readpage(struct page *page, struct extent_map **em_cached,
-			 struct bio **bio, int mirror_num,
-			 unsigned long *bio_flags, unsigned int read_flags,
-			 u64 *prev_em_start)
+			 struct bio **bio, unsigned long *bio_flags,
+			 unsigned int read_flags, u64 *prev_em_start)
 {
 	struct inode *inode = page->mapping->host;
 	u64 start = page_offset(page);
@@ -3324,7 +3323,7 @@ static int __do_readpage(struct page *page, struct extent_map **em_cached,
 		ret = submit_extent_page(REQ_OP_READ | read_flags, NULL,
 					 page, offset, disk_io_size,
 					 pg_offset, bio,
-					 end_bio_extent_readpage, mirror_num,
+					 end_bio_extent_readpage, 0,
 					 *bio_flags,
 					 this_bio_flag,
 					 force_bio_submit);
@@ -3361,7 +3360,7 @@ static inline void contiguous_readpages(struct page *pages[], int nr_pages,
 	btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
 
 	for (index = 0; index < nr_pages; index++) {
-		__do_readpage(pages[index], em_cached, bio, 0, bio_flags,
+		__do_readpage(pages[index], em_cached, bio, bio_flags,
 			      REQ_RAHEAD, prev_em_start);
 		put_page(pages[index]);
 	}
@@ -3377,7 +3376,7 @@ int extent_read_full_page(struct page *page, struct bio **bio,
 
 	btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
 
-	ret = __do_readpage(page, NULL, bio, 0, bio_flags, 0, NULL);
+	ret = __do_readpage(page, NULL, bio, bio_flags, 0, NULL);
 	return ret;
 }
 
-- 
2.17.1


  parent reply	other threads:[~2020-09-09  9:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  9:49 [PATCH 00/10] Cleanup metadata page reading path Nikolay Borisov
2020-09-09  9:49 ` [PATCH 01/10] btrfs: Remove btree_readpage Nikolay Borisov
2020-09-09 10:37   ` Johannes Thumshirn
2020-09-09 11:13     ` Qu Wenruo
2020-09-09  9:49 ` [PATCH 02/10] btrfs: Remove pg_offset from btrfs_get_extent Nikolay Borisov
2020-09-09 10:40   ` Johannes Thumshirn
2020-09-09 11:15   ` Qu Wenruo
2020-09-09  9:49 ` [PATCH 03/10] btrfs: Simplify metadata pages reading Nikolay Borisov
2020-09-09 11:20   ` Qu Wenruo
2020-09-14  8:08     ` Nikolay Borisov
2020-09-14  8:22       ` Qu Wenruo
2020-09-10 14:56   ` Josef Bacik
2020-09-09  9:49 ` [PATCH 04/10] btrfs: Remove btree_get_extent Nikolay Borisov
2020-09-10 14:57   ` Josef Bacik
2020-09-09  9:49 ` [PATCH 05/10] btrfs: Remove btrfs_get_extent indirection from __do_readpage Nikolay Borisov
2020-09-09 11:24   ` Qu Wenruo
2020-09-09 11:56     ` Nikolay Borisov
2020-09-09  9:49 ` [PATCH 06/10] btrfs: Remove mirror_num argument from extent_read_full_page Nikolay Borisov
2020-09-10 14:58   ` Josef Bacik
2020-09-09  9:49 ` [PATCH 07/10] btrfs: Promote extent_read_full_page to btrfs_readpage Nikolay Borisov
2020-09-10 15:01   ` Josef Bacik
2020-09-09  9:49 ` [PATCH 08/10] btrfs: Sink mirror_num argument in extent_read_full_page Nikolay Borisov
2020-09-10 15:02   ` Josef Bacik
2020-09-09  9:49 ` [PATCH 09/10] btrfs: Sink read_flags argument into extent_read_full_page Nikolay Borisov
2020-09-10 15:03   ` Josef Bacik
2020-09-09  9:49 ` Nikolay Borisov [this message]
2020-09-10 15:04   ` [PATCH 10/10] btrfs: Sink mirror_num argument in __do_readpage Josef Bacik

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=20200909094914.29721-11-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.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