linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Delayed refs cleanups/streamlining
@ 2018-03-21  8:45 Nikolay Borisov
  2018-03-21  8:45 ` [PATCH 1/8] btrfs: Factor out common delayed refs init code Nikolay Borisov
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Nikolay Borisov @ 2018-03-21  8:45 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

This patchkit aims to simplify and streamline the logic involved in 
initialising and adding delayed refs/delayed head structures which deal with 
modification of the extent tree. Currently the logic for init and add was 
contained in one function for each type of structure. This resulted in very 
awkward interface with shitloads of arguments, this in turn made it really hard
to understand the gist of the code. This series rectifies the situation by 
extracting common parts and using those rather than open coding duplicated
logic for every type of delayed ref (tree or data ref). 

The first 5 patches deal with the delayed_ref structs. Each patch is 
incremental and makes the code bisectable. The last tree factor out the init 
code for delayed_ref_head into a separate function and begin to use it. The 
final completely splits the two. 

The net result is both a cleaner interface as well as somewhat reduced 
critical section under delayed_refs->lock spinlock. 

Nikolay Borisov (8):
  btrfs: Factor out common delayed refs init code
  btrfs: Use init_delayed_ref_common in add_delayed_tree_ref
  btrfs: Use init_delayed_ref_common in add_delayed_data_ref
  btrfs: Open-code add_delayed_tree_ref
  btrfs: Open-code add_delayed_data_ref
  btrfs: Introduce init_delayed_ref_head
  btrfs: Use init_delayed_ref_head in add_delayed_ref_head
  btrfs: split delayed ref head initialization and addition

 fs/btrfs/delayed-ref.c | 239 ++++++++++++++++++++++++-------------------------
 1 file changed, 119 insertions(+), 120 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2018-03-27 19:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-21  8:45 [PATCH 0/8] Delayed refs cleanups/streamlining Nikolay Borisov
2018-03-21  8:45 ` [PATCH 1/8] btrfs: Factor out common delayed refs init code Nikolay Borisov
2018-03-21  8:45 ` [PATCH 2/8] btrfs: Use init_delayed_ref_common in add_delayed_tree_ref Nikolay Borisov
2018-03-21  8:45 ` [PATCH 3/8] btrfs: Use init_delayed_ref_common in add_delayed_data_ref Nikolay Borisov
2018-03-21  8:45 ` [PATCH 4/8] btrfs: Open-code add_delayed_tree_ref Nikolay Borisov
2018-03-21  8:45 ` [PATCH 5/8] btrfs: Open-code add_delayed_data_ref Nikolay Borisov
2018-03-21  8:45 ` [PATCH 6/8] btrfs: Introduce init_delayed_ref_head Nikolay Borisov
2018-03-21  8:45 ` [PATCH 7/8] btrfs: Use init_delayed_ref_head in add_delayed_ref_head Nikolay Borisov
2018-03-21  8:45 ` [PATCH 8/8] btrfs: split delayed ref head initialization and addition Nikolay Borisov
2018-03-27 19:08 ` [PATCH 0/8] Delayed refs cleanups/streamlining David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).