mbox series

[0/7] Remove struct extent_io_ops

Message ID 20200918133439.23187-1-nborisov@suse.com (mailing list archive)
Headers show
Series Remove struct extent_io_ops | expand

Message

Nikolay Borisov Sept. 18, 2020, 1:34 p.m. UTC
Finally it's time to remove "struct extent_io_ops" and get rid of the indirect
calls to the "hook" functions. Each patch is rather self-explanatory, the basic
idea is to replace indirect calls with an "if" construct (patches 1,3,5,6). The
rest simply remove struct members and the struct it self.

This series survived a full xfstest run.

Nikolay Borisov (7):
  btrfs: Don't call readpage_end_io_hook for the btree inode
  btrfs: Remove extent_io_ops::readpage_end_io_hook
  btrfs: Call submit_bio_hook directly in submit_one_bio
  btrfs: Don't opencode is_data_inode in end_bio_extent_readpage
  btrfs: Stop calling submit_bio_hook for data inodes
  btrfs: Call submit_bio_hook directly for metadata pages
  btrfs: Remove struct extent_io_ops

 fs/btrfs/ctree.h             |  6 ++++--
 fs/btrfs/disk-io.c           | 20 +++++---------------
 fs/btrfs/disk-io.h           |  6 +++++-
 fs/btrfs/extent-io-tree.h    |  1 -
 fs/btrfs/extent_io.c         | 25 +++++++++++++------------
 fs/btrfs/extent_io.h         |  5 +----
 fs/btrfs/inode.c             | 28 ++++------------------------
 fs/btrfs/tests/inode-tests.c |  1 -
 8 files changed, 32 insertions(+), 60 deletions(-)

--
2.17.1

Comments

Johannes Thumshirn Sept. 21, 2020, 3:05 p.m. UTC | #1
On 18/09/2020 15:34, Nikolay Borisov wrote:
> Finally it's time to remove "struct extent_io_ops" and get rid of the indirect
> calls to the "hook" functions. Each patch is rather self-explanatory, the basic
> idea is to replace indirect calls with an "if" construct (patches 1,3,5,6). The
> rest simply remove struct members and the struct it self.
> 
> This series survived a full xfstest run.
> 
> Nikolay Borisov (7):
>   btrfs: Don't call readpage_end_io_hook for the btree inode
>   btrfs: Remove extent_io_ops::readpage_end_io_hook
>   btrfs: Call submit_bio_hook directly in submit_one_bio
>   btrfs: Don't opencode is_data_inode in end_bio_extent_readpage
>   btrfs: Stop calling submit_bio_hook for data inodes
>   btrfs: Call submit_bio_hook directly for metadata pages
>   btrfs: Remove struct extent_io_ops
> 
>  fs/btrfs/ctree.h             |  6 ++++--
>  fs/btrfs/disk-io.c           | 20 +++++---------------
>  fs/btrfs/disk-io.h           |  6 +++++-
>  fs/btrfs/extent-io-tree.h    |  1 -
>  fs/btrfs/extent_io.c         | 25 +++++++++++++------------
>  fs/btrfs/extent_io.h         |  5 +----
>  fs/btrfs/inode.c             | 28 ++++------------------------
>  fs/btrfs/tests/inode-tests.c |  1 -
>  8 files changed, 32 insertions(+), 60 deletions(-)
> 
> --
> 2.17.1
> 
> 

Apart from some nitpicks,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Sept. 24, 2020, 11:35 a.m. UTC | #2
On Fri, Sep 18, 2020 at 04:34:32PM +0300, Nikolay Borisov wrote:
> Finally it's time to remove "struct extent_io_ops" and get rid of the indirect
> calls to the "hook" functions. Each patch is rather self-explanatory, the basic
> idea is to replace indirect calls with an "if" construct (patches 1,3,5,6). The
> rest simply remove struct members and the struct it self.
> 
> This series survived a full xfstest run.
> 
> Nikolay Borisov (7):
>   btrfs: Don't call readpage_end_io_hook for the btree inode
>   btrfs: Remove extent_io_ops::readpage_end_io_hook
>   btrfs: Call submit_bio_hook directly in submit_one_bio
>   btrfs: Don't opencode is_data_inode in end_bio_extent_readpage
>   btrfs: Stop calling submit_bio_hook for data inodes
>   btrfs: Call submit_bio_hook directly for metadata pages
>   btrfs: Remove struct extent_io_ops

With the fixups added to misc-next, thanks.