mbox series

[0/3] Cleanups around btrfs_get_extent_fiemap

Message ID 20181212074234.20613-1-nborisov@suse.com (mailing list archive)
Headers show
Series Cleanups around btrfs_get_extent_fiemap | expand

Message

Nikolay Borisov Dec. 12, 2018, 7:42 a.m. UTC
Following a conversation with Johaness this is what fell out. Turns out the
signature of btrfs_get_extent_fiemap is needlessly complext. So the first patch 
fixes it by removing the unnecessary arguments. Patch 2 is a bit of a "catch-all"
mainly renaming variables, thus helping recognise what the code does and
refreshing comments and removing one extra if. Finally, patch 3 removes an
assignment making it (at least to me) more clear what context a particular
variable is used in.

This has survived multiple xfstest runs. 

Nikolay Borisov (3):
  btrfs: Remove unused arguments from btrfs_get_extent_fiemap
  btrfs: Refactor btrfs_get_extent_fiemap
  btrfs: Remove redundant assignment

 fs/btrfs/ctree.h     |  3 +-
 fs/btrfs/extent_io.c |  3 +-
 fs/btrfs/file.c      |  3 +-
 fs/btrfs/inode.c     | 92 +++++++++++++++++++++++---------------------
 4 files changed, 51 insertions(+), 50 deletions(-)

Comments

David Sterba Jan. 4, 2019, 3:01 p.m. UTC | #1
On Wed, Dec 12, 2018 at 09:42:31AM +0200, Nikolay Borisov wrote:
> Following a conversation with Johaness this is what fell out. Turns out the
> signature of btrfs_get_extent_fiemap is needlessly complext. So the first patch 
> fixes it by removing the unnecessary arguments. Patch 2 is a bit of a "catch-all"
> mainly renaming variables, thus helping recognise what the code does and
> refreshing comments and removing one extra if. Finally, patch 3 removes an
> assignment making it (at least to me) more clear what context a particular
> variable is used in.
> 
> This has survived multiple xfstest runs. 
> 
> Nikolay Borisov (3):
>   btrfs: Remove unused arguments from btrfs_get_extent_fiemap
>   btrfs: Refactor btrfs_get_extent_fiemap
>   btrfs: Remove redundant assignment

1-3 added to misc-next, thanks. I did a few more adjustments to comments
in patch 2/3.