linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH 2/3] btrfs: Unexport get_block_group_index()
Date: Tue, 30 Jan 2018 10:18:26 +0200	[thread overview]
Message-ID: <995dc89a-2f5e-28c0-70e5-f7b18719c1a0@suse.com> (raw)
In-Reply-To: <20180130074039.24987-2-wqu@suse.com>



On 30.01.2018 09:40, Qu Wenruo wrote:
> That function is only used inside extent-tree.c.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>  fs/btrfs/ctree.h       | 1 -
>  fs/btrfs/extent-tree.c | 3 ++-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 13c260b525a1..27249240fa3e 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -2629,7 +2629,6 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(
>  						 u64 bytenr);
>  void btrfs_get_block_group(struct btrfs_block_group_cache *cache);
>  void btrfs_put_block_group(struct btrfs_block_group_cache *cache);
> -int get_block_group_index(struct btrfs_block_group_cache *cache);
>  struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
>  					     struct btrfs_root *root,
>  					     u64 parent, u64 root_objectid,
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index e9c31b567a9c..6e1128aa29d6 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -7346,7 +7346,8 @@ wait_block_group_cache_done(struct btrfs_block_group_cache *cache)
>  	return ret;
>  }
>  
> -int get_block_group_index(struct btrfs_block_group_cache *cache)
> +static enum btrfs_raid_types
> +get_block_group_index(struct btrfs_block_group_cache *cache)
>  {
>  	return btrfs_bg_flags_to_raid_index(cache->flags);
>  }

I'd rather you removed this function and used bg_flags_to_raid_index
directly. Otherwise we have yet another level of indirection with a
rather wrong name - "block_group_index" ?

> 

  parent reply	other threads:[~2018-01-30  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30  7:40 [PATCH 1/3] btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() Qu Wenruo
2018-01-30  7:40 ` [PATCH 2/3] btrfs: Unexport get_block_group_index() Qu Wenruo
2018-01-30  8:14   ` Anand Jain
2018-01-30  8:18   ` Nikolay Borisov [this message]
2018-01-30  9:59     ` Qu Wenruo
2018-01-30  7:40 ` [PATCH 3/3] btrfs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info Qu Wenruo
2018-01-30  8:18   ` Anand Jain
2018-01-30  8:22   ` Nikolay Borisov
2018-01-30  8:14 ` [PATCH 1/3] btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() Anand Jain
2018-01-30  8:16 ` Nikolay Borisov
2018-01-30 10:05   ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=995dc89a-2f5e-28c0-70e5-f7b18719c1a0@suse.com \
    --to=nborisov@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).