public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] refactoring __btrfs_map_block
@ 2019-06-03  9:05 Nikolay Borisov
  2019-06-03  9:05 ` [PATCH 1/3] btrfs: Introduce struct btrfs_io_geometry Nikolay Borisov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nikolay Borisov @ 2019-06-03  9:05 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

__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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-12 16:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03  9:05 [PATCH 0/3] refactoring __btrfs_map_block Nikolay Borisov
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox