From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 0/3] refactoring __btrfs_map_block
Date: Mon, 3 Jun 2019 12:05:02 +0300 [thread overview]
Message-ID: <20190603090505.16800-1-nborisov@suse.com> (raw)
__btrfs_map_block is probably one of the longest functions in btrfs and is responsible
for mapping high-level RW requests to a logical address to lower-level bios
that are sent to multiple devices (depending on the allocation profile the block
group this address belongs to). Additionally, it's also used to calculate the
various characteristic of the given (address,len) tuple such as the internal
stripe len that remains if the given request is satisfied.
This conflation of 2 actions make it a bit hard to follow the function, this
patchset aims to rectify this by factoring out the "address calculation
mechanics" into a separate function. To reduce the number of variables having
to pass also introduce a struct with the same name that holds all the output
values.
Nikolay Borisov (3):
btrfs: Introduce struct btrfs_io_geometry
btrfs: Introduce btrfs_io_geometry
btrfs: Use btrfs_io_geometry appropriately
fs/btrfs/inode.c | 25 +++----
fs/btrfs/volumes.c | 169 +++++++++++++++++++++++++++++----------------
fs/btrfs/volumes.h | 11 +++
3 files changed, 133 insertions(+), 72 deletions(-)
--
2.17.1
next reply other threads:[~2019-06-03 9:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 9:05 Nikolay Borisov [this message]
2019-06-03 9:05 ` [PATCH 1/3] btrfs: Introduce struct btrfs_io_geometry Nikolay Borisov
2019-06-05 7:35 ` Johannes Thumshirn
2019-06-05 12:37 ` David Sterba
2019-06-03 9:05 ` [PATCH 2/3] btrfs: Introduce btrfs_io_geometry Nikolay Borisov
2019-06-05 8:01 ` Johannes Thumshirn
2019-06-12 16:31 ` David Sterba
2019-06-03 9:05 ` [PATCH 3/3] btrfs: Use btrfs_io_geometry appropriately Nikolay Borisov
2019-06-12 16:29 ` 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=20190603090505.16800-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox