All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Removal of optional hooks from struct extent_io_ops
@ 2018-11-01 12:09 Nikolay Borisov
  2018-11-01 12:09 ` [PATCH 1/8] btrfs: Remove extent_io_ops::fill_delalloc Nikolay Borisov
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Nikolay Borisov @ 2018-11-01 12:09 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

extent_io_ops has a set of 8 optional hooks which are set only for data and 
freespace inodes. The majority of them actually deal with delallocs in one way 
or another. Inspecting the code it transpired that there is actually no need to
have them as function pointers in a structure. Data/freespace inodes can easily
be distinguished from the btree_inode (which is pending removal anyway) by 
inspecting extent_io_tree::private_data. This member is set by all data/freespace
inodes. This series exploits this fact to remove the majority of them. Others, 
such as fill_delalloc, writepage_start_hook and writepage_end_io_hook are always
called from the data writeout path and can be directly called without having to
check whether the respective pointers are set. 

This series has undergone multiple xfstest runs and no regressions were 
identified. Additionally all but run_delalloc_range functions are given more 
descriptive names, related to their actual intent. 

Nikolay Borisov (8):
  btrfs: Remove extent_io_ops::fill_delalloc
  btrfs: Remove extent_io_ops::writepage_start_hook
  btrfs: Remove extent_io_ops::writepage_end_io_hook
  btrfs: Remove extent_io_ops::check_extent_io_range callback
  btrfs: Remove extent_io_ops::set_bit_hook extent_io callback
  btrfs: Remove extent_io_ops::clear_bit_hook callback
  btrfs: Remove extent_io_ops::merge_extent_hook callback
  btrfs: Remove extent_io_ops::split_extent_hook callback

 fs/btrfs/compression.c           |  11 ++--
 fs/btrfs/ctree.h                 |  15 +++++
 fs/btrfs/extent_io.c             | 131 +++++++++++++++++----------------------
 fs/btrfs/extent_io.h             |  24 -------
 fs/btrfs/inode.c                 |  86 +++++++++----------------
 fs/btrfs/tests/extent-io-tests.c |   2 +-
 6 files changed, 105 insertions(+), 164 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2018-11-05 16:21 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 12:09 [PATCH 0/8] Removal of optional hooks from struct extent_io_ops Nikolay Borisov
2018-11-01 12:09 ` [PATCH 1/8] btrfs: Remove extent_io_ops::fill_delalloc Nikolay Borisov
2018-11-01 18:59   ` Josef Bacik
2018-11-05 16:20   ` David Sterba
2018-11-01 12:09 ` [PATCH 2/8] btrfs: Remove extent_io_ops::writepage_start_hook Nikolay Borisov
2018-11-01 19:00   ` Josef Bacik
2018-11-01 12:09 ` [PATCH 3/8] btrfs: Remove extent_io_ops::writepage_end_io_hook Nikolay Borisov
2018-11-01 19:03   ` Josef Bacik
2018-11-02  6:15     ` Nikolay Borisov
2018-11-01 12:09 ` [PATCH 4/8] btrfs: Remove extent_io_ops::check_extent_io_range callback Nikolay Borisov
2018-11-01 19:05   ` Josef Bacik
2018-11-01 12:09 ` [PATCH 5/8] btrfs: Remove extent_io_ops::set_bit_hook extent_io callback Nikolay Borisov
2018-11-01 19:06   ` Josef Bacik
2018-11-01 12:09 ` [PATCH 6/8] btrfs: Remove extent_io_ops::clear_bit_hook callback Nikolay Borisov
2018-11-01 19:08   ` Josef Bacik
2018-11-01 12:09 ` [PATCH 7/8] btrfs: Remove extent_io_ops::merge_extent_hook callback Nikolay Borisov
2018-11-01 19:11   ` Josef Bacik
2018-11-01 12:09 ` [PATCH 8/8] btrfs: Remove extent_io_ops::split_extent_hook callback Nikolay Borisov
2018-11-01 19:12   ` Josef Bacik
2018-11-05 16:21 ` [PATCH 0/8] Removal of optional hooks from struct extent_io_ops David Sterba

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.