From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 00/10] Cleanup metadata page reading path
Date: Wed, 9 Sep 2020 12:49:04 +0300 [thread overview]
Message-ID: <20200909094914.29721-1-nborisov@suse.com> (raw)
This series streamlines the page read path for metadata pages. Currently
__do_readpage is shared between ordinary data inodes as well as the btree_inode.
This is unnecenssary and brings clutter to the interface of __do_readpage et al
in the form of needlessly passed parameters and unnecessary actions performed
in btree_get_extent just to appease the interface/logic of __do_readpage.
To simplify the code metadata read is switched from calling __do_readpage to
directly calling submit_extent_page in read_extent_buffer_pages which is sufficient
to grab metadata pages. This in turn paves the way for further cleanups by
removing a lot of arguments from top level functions and sinking them in
lowe-level worker functions.
Patch 1 and 2 remove unused function and a parameter from btrfs_get_extent.
Patch 3 switches read_extent_buffer_pages (sole metadata read path) to using
submit_extent_page which enables further simplifications. Following patches
now-unused functions and removes certain indirection now that __do_readpage
is used only for data read.
Every patch has survived a -g quick and the overall series survived a full
xfstest run.
Nikolay Borisov (10):
btrfs: Remove btree_readpage
btrfs: Remove pg_offset from btrfs_get_extent
btrfs: Simplify metadata pages reading
btrfs: Remove btree_get_extent
btrfs: Remove btrfs_get_extent indirection from __do_readpage
btrfs: Remove mirror_num argument from extent_read_full_page
btrfs: Promote extent_read_full_page to btrfs_readpage
btrfs: Sink mirror_num argument in extent_read_full_page
btrfs: Sink read_flags argument into extent_read_full_page
btrfs: Sink mirror_num argument in __do_readpage
fs/btrfs/ctree.h | 3 +-
fs/btrfs/disk-io.c | 53 --------------------------
fs/btrfs/disk-io.h | 3 --
fs/btrfs/extent_io.c | 74 ++++++++++++------------------------
fs/btrfs/extent_io.h | 10 +++--
fs/btrfs/file.c | 12 +++---
fs/btrfs/inode.c | 37 +++++++++---------
fs/btrfs/ioctl.c | 2 +-
fs/btrfs/tests/inode-tests.c | 42 ++++++++++----------
9 files changed, 79 insertions(+), 157 deletions(-)
--
2.17.1
next reply other threads:[~2020-09-09 9:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 9:49 Nikolay Borisov [this message]
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 20:46 ` kernel test robot
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 ` [PATCH 10/10] btrfs: Sink mirror_num argument in __do_readpage Nikolay Borisov
2020-09-10 15:04 ` 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-1-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.