All of lore.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 v2 7/9] btrfs: Sink mirror_num argument in extent_read_full_page
Date: Mon, 14 Sep 2020 12:37:09 +0300	[thread overview]
Message-ID: <20200914093711.13523-8-nborisov@suse.com> (raw)
In-Reply-To: <20200914093711.13523-1-nborisov@suse.com>

It's always set to 0 from the sole caller - btrfs_readpage.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/extent_io.c | 5 ++---
 fs/btrfs/extent_io.h | 2 +-
 fs/btrfs/inode.c     | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 402b88ddcbca..f43827bee7e6 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3365,7 +3365,7 @@ static inline void contiguous_readpages(struct page *pages[], int nr_pages,
 	}
 }

-int extent_read_full_page(struct page *page, struct bio **bio, int mirror_num,
+int extent_read_full_page(struct page *page, struct bio **bio,
 			  unsigned long *bio_flags, unsigned int read_flags)
 {
 	struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
@@ -3375,8 +3375,7 @@ int extent_read_full_page(struct page *page, struct bio **bio, int mirror_num,

 	btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);

-	ret = __do_readpage(page, NULL, bio, mirror_num, bio_flags, read_flags,
-			    NULL);
+	ret = __do_readpage(page, NULL, bio, 0, bio_flags, read_flags, NULL);
 	return ret;
 }

diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 8fec00c50846..3562c9203de3 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -195,7 +195,7 @@ int try_release_extent_buffer(struct page *page);

 int __must_check submit_one_bio(struct bio *bio, int mirror_num,
 				unsigned long bio_flags);
-int extent_read_full_page(struct page *page, struct bio **bio, int mirror_num,
+int extent_read_full_page(struct page *page, struct bio **bio,
 			  unsigned long *bio_flags, unsigned int read_flags);
 int extent_write_full_page(struct page *page, struct writeback_control *wbc);
 int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f01066607901..31a154c7fb00 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8044,7 +8044,7 @@ int btrfs_readpage(struct file *file, struct page *page)
 	unsigned long bio_flags = 0;
 	int ret;

-	ret = extent_read_full_page(page, &bio, 0, &bio_flags, 0);
+	ret = extent_read_full_page(page, &bio, &bio_flags, 0);
 	if (bio)
 		ret = submit_one_bio(bio, 0, bio_flags);
 	return ret;
--
2.17.1


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

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  9:37 [PATCH v2 0/9] Cleanup metadata page reading path Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 1/9] btrfs: Remove btree_readpage Nikolay Borisov
2020-09-14 10:51   ` Qu Wenruo
2020-09-14  9:37 ` [PATCH v2 2/9] btrfs: Simplify metadata pages reading Nikolay Borisov
2020-09-14 11:01   ` Qu Wenruo
2020-09-14  9:37 ` [PATCH v2 3/9] btrfs: Remove btree_get_extent Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 4/9] btrfs: Remove btrfs_get_extent indirection from __do_readpage Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 5/9] btrfs: Remove mirror_num argument from extent_read_full_page Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 6/9] btrfs: Promote extent_read_full_page to btrfs_readpage Nikolay Borisov
2020-09-14  9:37 ` Nikolay Borisov [this message]
2020-09-14 10:35   ` [PATCH v2 7/9] btrfs: Sink mirror_num argument in extent_read_full_page Johannes Thumshirn
2020-09-14 10:38     ` Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 8/9] btrfs: Sink read_flags argument into extent_read_full_page Nikolay Borisov
2020-09-14  9:37 ` [PATCH v2 9/9] btrfs: Sink mirror_num argument in __do_readpage Nikolay Borisov
2020-09-14 10:39 ` [PATCH v2 0/9] Cleanup metadata page reading path Johannes Thumshirn
2020-09-14 11:39   ` Nikolay Borisov
2020-09-14 11:44     ` Johannes Thumshirn
2020-09-14 11:39 ` [PATCH] btrfs: Opencode extent_read_full_page to its sole caller Nikolay Borisov
2020-09-14 11:45   ` Johannes Thumshirn
2020-09-15  7:44   ` David Sterba
2020-09-15  7:43 ` [PATCH v2 0/9] Cleanup metadata page reading path David Sterba

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=20200914093711.13523-8-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.